diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2014-01-02 04:49:36 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-02 07:48:59 +0400 |
commit | c3ac17cd6af2687d5881184edd310a5f9c4baa98 (patch) | |
tree | 946fc5f549a477168f86cfb2ef4cad27e1e2979f /net | |
parent | 7e0309631ecf0cd16edba72ff74747fa1b96ead3 (diff) | |
download | linux-c3ac17cd6af2687d5881184edd310a5f9c4baa98.tar.xz |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/sit.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |