From: Li RongQing Date: Thu, 2 Jan 2014 00:49:36 +0000 (+0800) Subject: ipv6: fix the use of pcpu_tstats in sit X-Git-Tag: v3.13-rc8~16^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3ac17cd6af2687d5881184edd310a5f9c4baa98;p=platform%2Fkernel%2Flinux-stable.git ipv6: fix the use of pcpu_tstats in sit when read/write the 64bit data, the correct lock should be hold. Signed-off-by: Li RongQing Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index c874822..d3005b3 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -702,8 +702,10 @@ static int ipip6_rcv(struct sk_buff *skb) } tstats = this_cpu_ptr(tunnel->dev->tstats); + u64_stats_update_begin(&tstats->syncp); tstats->rx_packets++; tstats->rx_bytes += skb->len; + u64_stats_update_end(&tstats->syncp); netif_rx(skb);