linux-stable-rt/net/sunrpc
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
..
auth_gss [PATCH] gss_spkm3: fix error handling in module init 2006-12-22 08:55:49 -08:00
Makefile
auth.c
auth_null.c
auth_unix.c
cache.c [PATCH] knfsd: svcrpc: remove another silent drop from deferral code 2006-12-13 09:05:54 -08:00
clnt.c [PATCH] NFS: Fix Oops in rpc_call_sync() 2007-01-24 12:31:06 -08:00
pmap_clnt.c
rpc_pipe.c [PATCH] struct path: convert sunrpc 2006-12-08 08:28:50 -08:00
sched.c [PATCH] NFS: Fix Oops in rpc_call_sync() 2007-01-24 12:31:06 -08:00
socklib.c
stats.c
sunrpc_syms.c
svc.c [PATCH] knfsd: fix a race in closing NFSd connections 2007-02-09 09:25:47 -08:00
svcauth.c
svcauth_unix.c [PATCH] knfsd: Don't ignore kstrdup failure in rpc caches 2006-12-13 09:05:54 -08:00
svcsock.c [PATCH] knfsd: fix a race in closing NFSd connections 2007-02-09 09:25:47 -08:00
sysctl.c
timer.c
xdr.c
xprt.c
xprtsock.c