udp: fix a race in encap_rcv handling
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 1 Nov 2011 12:56:59 +0000 (12:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Nov 2011 04:51:27 +0000 (00:51 -0400)
commit0ad92ad03aa444b312bd318b0341011a8be09d13
treea6acc6651c301af1a5c7edd4258a441da091bfd3
parent501e89d3aef10f9a5b79137fbb0bcd5bf9cac2ac
udp: fix a race in encap_rcv handling

udp_queue_rcv_skb() has a possible race in encap_rcv handling, since
this pointer can be changed anytime.

We should use ACCESS_ONCE() to close the race.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c