netlink: fix races after skb queueing
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 5 Apr 2012 22:17:46 +0000 (22:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Apr 2012 08:21:06 +0000 (04:21 -0400)
commit4a7e7c2ad540e54c75489a70137bf0ec15d3a127
tree6e4b141c33e96f807e3d85bfe217bb5a3c8bcf0a
parente34fac1c2e9ec531c2d63a5e3aa9a6d0ef36a1d3
netlink: fix races after skb queueing

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>
net/netlink/af_netlink.c