diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-01-11 10:18:26 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:25 -0500 |
commit | f5131257f771ad0e84cf0314a2a86b66318755a9 (patch) | |
tree | bb91fb8a51ca5d0ad6483cc62d1d6c2956be6fb1 /net/sunrpc/clnt.c | |
parent | 80df9d202255071c8ec610a6a3fdca5cac69f7bd (diff) |
SUNRPC: remove RPC client pipefs dentries after unregister
Without this patch we have races:
rpc_fill_super rpc_free_client
rpc_pipefs_event(MOUNT) rpc_remove_pipedir
spin_lock(&rpc_client_lock);
rpc_setup_pipedir_sb
spin_unlock(&rpc_client_lock);
spin_lock(&rpc_client_lock);
(remove from list)
spin_unlock(&rpc_client_lock);
MEAMORY LEAKED
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 417074500592..c89ceb80fe87 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -578,7 +578,6 @@ rpc_free_client(struct rpc_clnt *clnt) | |||
578 | { | 578 | { |
579 | dprintk("RPC: destroying %s client for %s\n", | 579 | dprintk("RPC: destroying %s client for %s\n", |
580 | clnt->cl_protname, clnt->cl_server); | 580 | clnt->cl_protname, clnt->cl_server); |
581 | rpc_clnt_remove_pipedir(clnt); | ||
582 | if (clnt->cl_parent != clnt) { | 581 | if (clnt->cl_parent != clnt) { |
583 | rpc_release_client(clnt->cl_parent); | 582 | rpc_release_client(clnt->cl_parent); |
584 | goto out_free; | 583 | goto out_free; |
@@ -587,6 +586,7 @@ rpc_free_client(struct rpc_clnt *clnt) | |||
587 | kfree(clnt->cl_server); | 586 | kfree(clnt->cl_server); |
588 | out_free: | 587 | out_free: |
589 | rpc_unregister_client(clnt); | 588 | rpc_unregister_client(clnt); |
589 | rpc_clnt_remove_pipedir(clnt); | ||
590 | rpc_free_iostats(clnt->cl_metrics); | 590 | rpc_free_iostats(clnt->cl_metrics); |
591 | kfree(clnt->cl_principal); | 591 | kfree(clnt->cl_principal); |
592 | clnt->cl_metrics = NULL; | 592 | clnt->cl_metrics = NULL; |