Skip to content

Commit

Permalink
ipv6: fix the use of pcpu_tstats in sit
Browse files Browse the repository at this point in the history
when read/write the 64bit data, the correct lock should be hold.

Signed-off-by: Li RongQing <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Li RongQing authored and davem330 committed Jan 2, 2014
1 parent 7e03096 commit c3ac17c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c3ac17c

Please sign in to comment.