netlink: fix races after skb queueing
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 5 Apr 2012 22:17:46 +0000 (22:17 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:20 +0000 (13:14 +0100)
[ Upstream commit 4a7e7c2ad540e54c75489a70137bf0ec15d3a127 ]

As soon as an skb is queued into socket receive_queue, another thread
can consume it, so we are not allowed to reference skb anymore, or risk
use after free.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

No differences found