]> git.karo-electronics.de Git - karo-tx-linux.git/commit
udp: Fix rcv socket locking
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 15 Sep 2008 18:48:46 +0000 (11:48 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Oct 2008 02:44:45 +0000 (19:44 -0700)
commit8c4d2d9f936a353f3336fd521341826a70e0a9fd
treea24f1ced96f022a837884181db0d0ef58bc7dea5
parentbb5168ca75d488ee10e4653ddbf4cd51a57707f3
udp: Fix rcv socket locking

[ Upstream commits d97106ea52aa57e63ff40d04479016836bbb5a4e and
   93821778def10ec1e69aa3ac10adee975dad4ff3 ]

The previous patch in response to the recursive locking on IPsec
reception is broken as it tries to drop the BH socket lock while in
user context.

This patch fixes it by shrinking the section protected by the
socket lock to sock_queue_rcv_skb only.  The only reason we added
the lock is for the accounting which happens in that function.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/udp.c
net/ipv6/udp.c