[PATCH Trusty SRU 1/3] rpc_pipe: remove the clntXX dir if creating the pipe fails

tim.gardner at canonical.com tim.gardner at canonical.com
Fri Sep 5 16:50:40 UTC 2014

From: Jeff Layton <jlayton at redhat.com>

BugLink: http://bugs.launchpad.net/bugs/1365869

In the event that we create the gssd/clntXX dir, but the pipe creation
subsequently fails, then we should remove the clntXX dir before

Signed-off-by: Jeff Layton <jlayton at redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust at netapp.com>
(cherry picked from commit 3396f92f8be606ea485b0a82d4e7749a448b013b)
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
 net/sunrpc/rpc_pipe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 5cd7ad1..0b74c61 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -1313,6 +1313,8 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
 	pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data);
+	if (IS_ERR(pipe_dentry))
+		__rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);

More information about the kernel-team mailing list