]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
udp: Drop socket lock for encapsulated packets
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 Aug 2008 05:40:04 +0000 (22:40 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 8 Sep 2008 11:44:24 +0000 (04:44 -0700)
commitd01885e51bf577745ba935c70b55fe1405d6b632
tree55c3bc9921e079e8b6544595a6c1cb44238f3fab
parent4cd12f888ddb3a535ca34104593a0a62724ab104
udp: Drop socket lock for encapsulated packets

[ Upstream commit d97106ea52aa57e63ff40d04479016836bbb5a4e ]

The socket lock is there to protect the normal UDP receive path.
Encapsulation UDP sockets don't need that protection.  In fact
the locking is deadly for them as they may contain another UDP
packet within, possibly with the same addresses.

Also the nested bit was copied from TCP.  TCP needs it because
of accept(2) spawning sockets.  This simply doesn't apply to UDP
so I've removed it.

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