Commit c3ac17cd authored by Li RongQing's avatar Li RongQing Committed by David S. Miller

ipv6: fix the use of pcpu_tstats in sit

when read/write the 64bit data, the correct lock should be hold.
Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e030963
...@@ -702,8 +702,10 @@ static int ipip6_rcv(struct sk_buff *skb) ...@@ -702,8 +702,10 @@ static int ipip6_rcv(struct sk_buff *skb)
} }
tstats = this_cpu_ptr(tunnel->dev->tstats); tstats = this_cpu_ptr(tunnel->dev->tstats);
u64_stats_update_begin(&tstats->syncp);
tstats->rx_packets++; tstats->rx_packets++;
tstats->rx_bytes += skb->len; tstats->rx_bytes += skb->len;
u64_stats_update_end(&tstats->syncp);
netif_rx(skb); netif_rx(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment