[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1388623776-1448-1-git-send-email-roy.qing.li@gmail.com>
Date: Thu, 2 Jan 2014 08:49:36 +0800
From: roy.qing.li@...il.com
To: netdev@...r.kernel.org
Subject: [PATCH net-next] ipv6: fix the use of pcpu_tstats in sit
From: Li RongQing <roy.qing.li@...il.com>
when read/write the 64bit data, the correct lock should be hold.
Signed-off-by: Li RongQing <roy.qing.li@...il.com>
---
net/ipv6/sit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 366fbba..1e33d77 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);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists