android_kernel_samsung_msm8976/include/linux/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.h
auth_gss.h rpc: gss: eliminate print_hexl()'s 2006-12-06 10:46:43 -05:00
cache.h
clnt.h
debug.h SUNRPC: Remove pprintk() from net/sunrpc/xprt.c 2006-12-06 10:46:55 -05:00
gss_api.h
gss_asn1.h
gss_err.h
gss_krb5.h rpcgss: krb5: ignore seed 2006-12-06 10:46:47 -05:00
gss_spkm3.h rpc: spkm3 update 2006-12-06 10:46:44 -05:00
Kbuild
metrics.h
msg_prot.h
rpc_pipe_fs.h
sched.h [PATCH] NFS: Fix Oops in rpc_call_sync() 2007-01-24 12:31:06 -08:00
stats.h
svc.h [PATCH] knfsd: fix an NFSD bug with full sized, non-page-aligned reads 2007-01-26 13:50:59 -08:00
svcauth.h
svcauth_gss.h
svcsock.h [PATCH] knfsd: fix a race in closing NFSd connections 2007-02-09 09:25:47 -08:00
timer.h
types.h
xdr.h SUNRPC: Rename skb_reader_t and friends 2006-12-06 10:46:52 -05:00
xprt.h SUNRPC: Make address format buffers more generic 2006-12-06 10:46:51 -05:00