OpenVZ Forum


Home » Mailing lists » Devel » [PATCH v2 0/6] SUNRPC: make RPC clients use network-namespace-aware PipeFS routines
[PATCH v2 4/6] SUNRPC: remove RPC client pipefs dentries after unregister [message #44889 is a reply to message #44887] Wed, 11 January 2012 15:18 Go to previous messageGo to previous message
Stanislav Kinsbursky is currently offline  Stanislav Kinsbursky
Messages: 683
Registered: October 2011
Senior Member
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>

---
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 4170745..c89ceb8 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -578,7 +578,6 @@ rpc_free_client(struct rpc_clnt *clnt)
{
dprintk("RPC: destroying %s client for %s\n",
clnt->cl_protname, clnt->cl_server);
- rpc_clnt_remove_pipedir(clnt);
if (clnt->cl_parent != clnt) {
rpc_release_client(clnt->cl_parent);
goto out_free;
@@ -587,6 +586,7 @@ rpc_free_client(struct rpc_clnt *clnt)
kfree(clnt->cl_server);
out_free:
rpc_unregister_client(clnt);
+ rpc_clnt_remove_pipedir(clnt);
rpc_free_iostats(clnt->cl_metrics);
kfree(clnt->cl_principal);
clnt->cl_metrics = NULL;
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH v2 5/5] SUNRPC: kernel PipeFS mount point creation routines removed
Next Topic: [PATCH v2 6/6] SUNRPC: remove RPC PipeFS mount point reference from RPC client
Goto Forum:
  


Current Time: Fri Dec 26 21:20:33 GMT 2025

Total time taken to generate the page: 0.29112 seconds