linux/net/sunrpc
Trond Myklebust 87ed50036b SUNRPC: Ensure we release the socket write lock if the rpc_task exits early
If the rpc_task exits while holding the socket write lock before it has
allocated an rpc slot, then the usual mechanism for releasing the write
lock in xprt_release() is defeated.

The problem occurs if the call to xprt_lock_write() initially fails, so
that the rpc_task is put on the xprt->sending wait queue. If the task
exits after being assigned the lock by __xprt_lock_write_func, but
before it has retried the call to xprt_lock_and_alloc_slot(), then
it calls xprt_release() while holding the write lock, but will
immediately exit due to the test for task->tk_rqstp != NULL.

Reported-by: Chris Perl <chris.perl@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org [>= 3.1]
2013-01-08 14:30:43 -05:00
..
auth_gss SUNRPC set gss gc_expiry to full lifetime 2012-12-12 15:35:59 -05:00
xprtrdma nfsd4: cleanup: replace rq_resused count by rq_next_page pointer 2012-12-17 22:00:16 -05:00
addr.c SUNRPC: parametrize rpc_uaddr2sockaddr() by network context 2012-01-31 19:28:12 -05:00
auth_generic.c userns: Convert group_info values from gid_t to kgid_t. 2012-05-03 03:27:21 -07:00
auth_null.c SUNRPC: Move the bound cred to struct rpc_rqst 2010-08-04 08:54:09 -04:00
auth_unix.c userns: Convert group_info values from gid_t to kgid_t. 2012-05-03 03:27:21 -07:00
auth.c SUNRPC: Add rpcauth_list_flavors() 2012-07-16 15:12:15 -04:00
backchannel_rqst.c SUNRPC: remove two BUG_ON asserts 2012-11-04 14:43:41 -05:00
bc_svc.c SUNRPC: remove BUG_ON from bc_send 2012-11-04 14:43:41 -05:00
cache.c SUNRPC: remove BUG_ON calls from cache_read 2012-11-04 14:43:41 -05:00
clnt.c SUNRPC: Partial revert of commit 168e4b39d1 2013-01-04 12:59:30 -05:00
Kconfig nfs: enable swap on NFS 2012-07-31 18:42:48 -07:00
Makefile SUNRPC: sunrpc should not explicitly depend on NFS config options 2011-07-15 09:12:23 -04:00
netns.h SUNRPC: create GSS auth cache per network namespace 2012-01-31 19:28:15 -05:00
rpc_pipe.c Merge branch 'bugfixes' into nfs-for-next 2012-12-11 09:16:26 -05:00
rpcb_clnt.c Merge branch 'for-3.8' of git://linux-nfs.org/~bfields/linux 2012-12-20 14:04:11 -08:00
sched.c SUNRPC: Ensure we release the socket write lock if the rpc_task exits early 2013-01-08 14:30:43 -05:00
socklib.c sunrpc: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:28 +08:00
stats.c SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field 2012-03-02 15:36:38 -05:00
sunrpc_syms.c SUNRPC: register PipeFS file system after pernet sybsystem 2012-04-18 11:05:48 -04:00
sunrpc.h SUNRPC: subscribe RPC clients to pipefs notifications 2012-01-31 18:20:25 -05:00
svc_xprt.c SUNRPC: remove BUG_ON in svc_delete_xprt 2012-11-04 14:43:42 -05:00
svc.c Merge branch 'for-3.8' of git://linux-nfs.org/~bfields/linux 2012-12-20 14:04:11 -08:00
svcauth_unix.c ipv6: add ipv6_addr_hash() helper 2012-07-18 11:28:46 -07:00
svcauth.c net: sunrpc: kill unused macros 2010-12-17 15:48:21 -05:00
svcsock.c Merge branch 'for-3.8' of git://linux-nfs.org/~bfields/linux 2012-12-20 14:04:11 -08:00
sysctl.c SUNRPC: make SUNPRC clients list per network namespace context 2012-01-31 18:20:25 -05:00
timer.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xdr.c SUNRPC: remove BUG_ON in xdr_shrink_bufhead 2012-11-04 14:43:42 -05:00
xprt.c SUNRPC: Ensure we release the socket write lock if the rpc_task exits early 2013-01-08 14:30:43 -05:00
xprtsock.c SUNRPC: variable 'svsk' is unused in function bc_send_request 2012-12-15 17:05:57 -05:00