linux/net/sunrpc
Trond Myklebust 51c93ea2fa SUNRPC: Fix a potential race in xprt_connect()
commit 0a9a4304f3 upstream.

If an asynchronous connection attempt completes while another task is
in xprt_connect(), then the call to rpc_sleep_on() could end up
racing with the call to xprt_wake_pending_tasks().
So add a second test of the connection state after we've put the
task to sleep and set the XPRT_CONNECTING flag, when we know that there
can be no asynchronous connection attempts still in progress.

Fixes: 0b9e794313 ("SUNRPC: Move the test for XPRT_CONNECTING into...")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:54:17 +00:00
..
auth_gss SUNRPC: Fix leak of krb5p encode pages 2019-02-11 17:54:17 +00:00
xprtrdma svcrdma: Tail iovec leaves an orphaned DMA mapping 2017-02-23 03:54:03 +00:00
addr.c sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h 2013-02-05 09:41:14 -05:00
auth.c NFSv4: test SECINFO RPC_AUTH_GSS pseudoflavors for support 2014-06-24 18:46:58 -04:00
auth_generic.c sunrpc: Add missing kuids conversion for printing 2013-09-12 10:16:06 -04:00
auth_null.c SUNRPC refactor rpcauth_checkverf error returns 2013-09-03 15:25:09 -04:00
auth_unix.c SUNRPC refactor rpcauth_checkverf error returns 2013-09-03 15:25:09 -04:00
backchannel_rqst.c SUNRPC: Fix callback channel 2016-01-11 10:50:19 +00:00
bc_svc.c SUNRPC: remove BUG_ON from bc_send 2012-11-04 14:43:41 -05:00
cache.c sunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race 2016-05-01 00:06:01 +02:00
clnt.c SUNRPC: cleanup ida information when removing sunrpc module 2017-03-16 02:27:05 +00:00
Kconfig xprtrdma: add separate Kconfig options for NFSoRDMA client and server support 2014-03-28 18:02:12 -04:00
Makefile xprtrdma: add separate Kconfig options for NFSoRDMA client and server support 2014-03-28 18:02:12 -04: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_pipefs: fix double-dput() 2018-10-21 08:45:26 +01:00
rpcb_clnt.c SUNRPC: If the rpcbind channel is disconnected, fail the call to unregister 2013-08-07 17:07:18 -04:00
sched.c net, sunrpc: suppress allocation warning in rpc_malloc() 2014-05-29 11:11:51 -04:00
socklib.c net: Save software checksum complete 2014-06-11 15:46:13 -07:00
stats.c SUNRPC: Deprecate rpc_client->cl_protname 2013-08-30 09:19:34 -04:00
sunrpc.h SUNRPC: track whether a request is coming from a loop-back interface. 2014-05-22 15:59:18 -04:00
sunrpc_syms.c SUNRPC: cleanup ida information when removing sunrpc module 2017-03-16 02:27:05 +00:00
svc.c NFS: Don't drop CB requests with invalid principals 2016-11-20 01:16:49 +00:00
svc_xprt.c nfsd: Fix an Oops in free_session() 2019-02-11 17:53:43 +00:00
svcauth.c nfsd4: better reservation of head space for krb5 2014-05-30 17:32:17 -04:00
svcauth_unix.c kernel: make groups_sort calling a responsibility group_info allocators 2018-03-03 15:51:59 +00:00
svcsock.c SUNRPC: Fix locking around callback channel reply receive 2014-12-10 17:14:54 +00:00
sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
timer.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xdr.c SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() 2019-02-11 17:53:54 +00:00
xprt.c SUNRPC: Fix a potential race in xprt_connect() 2019-02-11 17:54:17 +00:00
xprtsock.c SUNRPC: Don't wake tasks during connection abort 2014-11-14 15:20:05 +00:00