aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sit.c
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2014-01-01 19:49:36 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-01 22:48:59 -0500
commitc3ac17cd6af2687d5881184edd310a5f9c4baa98 (patch)
tree946fc5f549a477168f86cfb2ef4cad27e1e2979f /net/ipv6/sit.c
parent7e0309631ecf0cd16edba72ff74747fa1b96ead3 (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.c2
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)
702 } 702 }
703 703
704 tstats = this_cpu_ptr(tunnel->dev->tstats); 704 tstats = this_cpu_ptr(tunnel->dev->tstats);
705 u64_stats_update_begin(&tstats->syncp);
705 tstats->rx_packets++; 706 tstats->rx_packets++;
706 tstats->rx_bytes += skb->len; 707 tstats->rx_bytes += skb->len;
708 u64_stats_update_end(&tstats->syncp);
707 709
708 netif_rx(skb); 710 netif_rx(skb);
709 711