linux/net
NeilBrown aaf68cfbf2 [PATCH] knfsd: fix a race in closing NFSd connections
If you lose this race, it can iput a socket inode twice and you get a BUG
in fs/inode.c

When I added the option for user-space to close a socket, I added some
cruft to svc_delete_socket so that I could call that function when closing
a socket per user-space request.

This was the wrong thing to do.  I should have just set SK_CLOSE and let
normal mechanisms do the work.

Not only wrong, but buggy.  The locking is all wrong and it openned up a
race where-by a socket could be closed twice.

So this patch:
  Introduces svc_close_socket which sets SK_CLOSE then either leave
  the close up to a thread, or calls svc_delete_socket if it can
  get SK_BUSY.

  Adds a bias to sk_busy which is removed when SK_DEAD is set,
  This avoid races around shutting down the socket.

  Changes several 'spin_lock' to 'spin_lock_bh' where the _bh
  was missing.

Bugzilla-url: http://bugzilla.kernel.org/show_bug.cgi?id=7916

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:25:47 -08:00
..
802
8021q
appletalk
atm
ax25
bluetooth [PATCH] hidp __user annotations 2007-02-09 09:14:06 -08:00
bridge
core
dccp
decnet
econet
ethernet
ieee80211
ipv4
ipv6
ipx [IPX]: Fix NULL pointer dereference on ipx unload 2007-02-08 16:02:21 -08:00
irda
iucv
key
lapb
llc
netfilter
netlabel
netlink
netrom
packet
rose
rxrpc
sched
sctp
sunrpc [PATCH] knfsd: fix a race in closing NFSd connections 2007-02-09 09:25:47 -08:00
tipc
unix
wanrouter
x25
xfrm Merge branch 'HEAD' of master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6 2007-02-08 15:25:18 -08:00
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE