linux/net/sunrpc
Trond Myklebust 718ba5b873 SUNRPC: Add helpers to prevent socket create from racing
The socket lock is currently held by the task that is requesting the
connection be established. While that is efficient in the case where
the connection happens quickly, it is racy in the case where it doesn't.
What we really want is for the connect helper to be able to block access
to the socket while it is being set up.

This patch does so by arranging to transfer the socket lock from the
task that is requesting the connect attempt, and then releasing that
lock once everything is done.
This scheme also gives us automatic protection against collisions with
the RPC close code, so we can kill the cancel_delayed_work_sync()
call in xs_close().

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2015-02-08 21:47:29 -05:00
..
auth_gss sunrpc: move rq_splice_ok flag into rq_flags 2014-12-09 11:22:21 -05:00
xprtrdma xprtrdma: Address sparse complaint in rpcr_to_rdmar() 2015-02-05 15:38:29 -05:00
addr.c replace strict_strto calls 2014-07-12 18:45:49 -04:00
auth_generic.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
auth_null.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
auth_unix.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
auth.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
backchannel_rqst.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
bc_svc.c SUNRPC: remove BUG_ON from bc_send 2012-11-04 14:43:41 -05:00
cache.c sunrpc/cache: convert to use string_escape_str() 2014-12-09 11:30:20 -05:00
clnt.c SUNRPC: Handle EADDRINUSE on connect 2015-02-08 21:47:27 -05:00
debugfs.c sunrpc: add a debugfs rpc_xprt directory with an info file in it 2014-11-27 13:14:52 -05:00
Kconfig sunrpc: add debugfs file for displaying client rpc_task queue 2014-11-27 13:14:51 -05:00
Makefile sunrpc: add debugfs file for displaying client rpc_task queue 2014-11-27 13:14:51 -05:00
netns.h Merge branch 'for-3.14' of git://linux-nfs.org/~bfields/linux 2014-01-30 10:18:43 -08:00
rpc_pipe.c rpc_pipe: Drop memory allocation cast 2014-07-12 18:43:44 -04:00
rpcb_clnt.c SUNRPC: NULL utsname dereference on NFS umount during namespace cleanup 2015-02-03 16:40:17 -05:00
sched.c SUNRPC: Allow waiting on memory allocation 2015-01-24 18:46:50 -05:00
socklib.c net: Save software checksum complete 2014-06-11 15:46:13 -07:00
stats.c sunrpc: add rpc_count_iostats_idx 2015-02-03 11:06:38 -08:00
sunrpc_syms.c sunrpc: add debugfs file for displaying client rpc_task queue 2014-11-27 13:14:51 -05:00
sunrpc.h SUNRPC: track whether a request is coming from a loop-back interface. 2014-05-22 15:59:18 -04:00
svc_xprt.c sunrpc: only call test_bit once in svc_xprt_received 2014-12-09 11:29:14 -05:00
svc.c sunrpc: convert to lockless lookup of queued server threads 2014-12-09 11:22:22 -05:00
svcauth_unix.c svcrpc: fix failures to handle -1 uid's 2013-07-08 17:27:23 -04:00
svcauth.c nfsd4: better reservation of head space for krb5 2014-05-30 17:32:17 -04:00
svcsock.c sunrpc: move rq_local field to rq_flags 2014-12-09 11:21:21 -05:00
sysctl.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
timer.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xdr.c rpc: fix xdr_truncate_encode to handle buffer ending on page boundary 2015-01-07 14:03:58 -05:00
xprt.c SUNRPC: Add helpers to prevent socket create from racing 2015-02-08 21:47:29 -05:00
xprtsock.c SUNRPC: Add helpers to prevent socket create from racing 2015-02-08 21:47:29 -05:00