diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2014-01-02 08:49:36 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-01 22:48:59 -0500 |
commit | c3ac17cd6af2687d5881184edd310a5f9c4baa98 (patch) | |
tree | 946fc5f549a477168f86cfb2ef4cad27e1e2979f /net/ipv6/sit.c | |
parent | 7e0309631ecf0cd16edba72ff74747fa1b96ead3 (diff) |
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/ipv6/sit.c')
-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 c8748225257..d3005b34476 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); |