From: Li RongQing <roy.qing.li@gmail.com> Date: Thu, 2 Jan 2014 00:49:36 +0000 (+0800) Subject: ipv6: fix the use of pcpu_tstats in sit X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=c3ac17cd6af2687d5881184edd310a5f9c4baa98;p=openwrt%2Fstaging%2Fblogic.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 <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> --- diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index c87482252577..d3005b34476a 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);