ipv6: fix the use of pcpu_tstats in sit
Subsystems (2)
PATCH 1/1 ipv6: fix the use of pcpu_tstats in sit
From: Li RongQing <[email protected]>
when read/write the 64bit data, the correct lock should be hold.
Signed-off-by Li RongQing <[email protected]>
--- net/ipv6/sit.c | 2 ++ 1 file changed, 2 insertions(+)
net/ipv6/sit.c +2 -0
@@ -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);
Signature · 1 line
1.7.10.4
Quoted 14 lines · On Thu, 2014-01-02 at 08:49 +0800, [email protected] wrote:
From: Li RongQing <[email protected]>
when read/write the 64bit data, the correct lock should be hold.
Signed-off-by Li RongQing <[email protected]>--- net/ipv6/sit.c | 2 ++ 1 file changed, 2 insertions(+)net/ipv6/sit.c +0
-0
net/ipv6/sit.c static int ipip6_rcv(struct sk_buff *skb) · line 711
Quoted 10 lines
net/ipv6/sit.c +2
-0@@ -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);
Fixes 87b6d218f3adb ("tunnel: implement 64 bits statistics")
Cc Stephen Hemminger <[email protected]>
Acked-by Eric Dumazet <[email protected]>
Thats a candidate for net and stable trees.
From: [email protected]
Date: Thu, 2 Jan 2014 08:49:36 +0800
Quoted 5 lines
From: Li RongQing <[email protected]>
when read/write the 64bit data, the correct lock should be hold.
Signed-off-by Li RongQing <[email protected]>
Applied.
From: Eric Dumazet <[email protected]>
Date: Wed, 01 Jan 2014 19:43:02 -0800
Quoted 1 line
Thats a candidate for net and stable trees.
Queued up for -stable, thanks.