]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: fix a race in sock_queue_err_skb()
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 6 Apr 2012 08:49:10 +0000 (10:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 17:16:56 +0000 (10:16 -0700)
commit44ffc7c1c604e0ea5dd727b440b74b6121d152d9
tree8660616091c343ee9a72940b14bedbaef608336b
parent567d1cca5d81446e452c0f4aa6751a8612a31817
net: fix a race in sock_queue_err_skb()

[ Upstream commit 110c43304db6f06490961529536c362d9ac5732f ]

As soon as an skb is queued into socket error 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/skbuff.c