WSL2-Linux-Kernel/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
..
Kbuild [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
auth.h [PATCH] knfsd: Prepare knfsd for support of rsize/wsize of up to 1MB, over TCP 2006-10-04 07:55:16 -07:00
auth_gss.h rpc: gss: eliminate print_hexl()'s 2006-12-06 10:46:43 -05:00
cache.h [PATCH] knfsd: knfsd: cache ipmap per TCP socket 2006-10-04 07:55:16 -07:00
clnt.h SUNRPC: Give cloned RPC clients their own rpc_pipefs directory 2006-12-06 10:46:29 -05:00
debug.h SUNRPC: Remove pprintk() from net/sunrpc/xprt.c 2006-12-06 10:46:55 -05:00
gss_api.h fix file specification in comments 2006-10-03 23:01:26 +02:00
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
metrics.h NFS: fix PROC_FS=n compile error 2006-04-19 12:43:46 -04:00
msg_prot.h [PATCH] knfsd: Allow lockd to drop replies as appropriate 2006-10-17 08:18:46 -07:00
rpc_pipe_fs.h WorkStruct: Separate delayable and non-delayable events. 2006-11-22 14:54:01 +00:00
sched.h [PATCH] NFS: Fix Oops in rpc_call_sync() 2007-01-24 12:31:06 -08:00
stats.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
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 [PATCH] knfsd: knfsd: cache ipmap per TCP socket 2006-10-04 07:55:16 -07:00
svcauth_gss.h fix file specification in comments 2006-10-03 23:01:26 +02:00
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