Commit 97962c24 authored by Wensong Zhang's avatar Wensong Zhang Committed by Stephen Hemminger

[IPV4] IPVS missing stats locking in estimation_timer()

parent 9dcdb6ef
......@@ -77,6 +77,8 @@ static void estimation_timer(unsigned long arg)
read_lock(&est_lock);
for (e = est_list; e; e = e->next) {
s = e->stats;
spin_lock(&s->lock);
n_conns = s->conns;
n_inpkts = s->inpkts;
n_outpkts = s->outpkts;
......@@ -108,6 +110,7 @@ static void estimation_timer(unsigned long arg)
e->last_outbytes = n_outbytes;
e->outbps += ((long)rate - (long)e->outbps)>>2;
s->outbps = (e->outbps+0xF)>>5;
spin_unlock(&s->lock);
}
read_unlock(&est_lock);
mod_timer(&est_timer, jiffies + 2*HZ);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment