]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Fix a deadlock in rpc_client_register()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 10 Jul 2013 19:33:01 +0000 (15:33 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 10 Jul 2013 19:58:55 +0000 (15:58 -0400)
commita0b8edce8f47b978f39ed185d6a2e6e134c07678
tree055c5d4ea0406bbb5457052ee85148b5f9746cf7
parenta0f3a76dd13ee21df80ab5c22fb87c977186e543
SUNRPC: Fix a deadlock in rpc_client_register()

Commit e725b43b9efaf82b75c1237b2d0ebc670e63c338 (SUNRPC: fix races on
PipeFS MOUNT notifications) introduces a regression when we call
rpc_setup_pipedir() with RPCSEC_GSS as the auth flavour.

By calling rpcauth_create() while holding the sn->pipefs_sb_lock, we
end up deadlocking in gss_pipes_dentries_create_net().
Fix is to register the client and release the mutex before calling
rpcauth_create().

Reported-by: Weston Andros Adamson <dros@netapp.com>
Tested-by: Weston Andros Adamson <dros@netapp.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: <stable@vger.kernel.org> # : e725b43: SUNRPC: fix races on PipeFS MOUNT
Cc: <stable@vger.kernel.org> # : 72e624d: SUNRPC: split client creation
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/clnt.c