Commit baea1631 authored by Stanislav Kinsbursky's avatar Stanislav Kinsbursky Committed by Ben Hutchings

SUNRPC: return negative value in case rpcbind client creation error

commit caea33da upstream.

Without this patch kernel will panic on LockD start, because lockd_up() checks
lockd_up_net() result for negative value.
From my pow it's better to return negative value from rpcbind routines instead
of replacing all such checks like in lockd_up().
Signed-off-by: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 58546c72
...@@ -246,7 +246,7 @@ static int rpcb_create_local_unix(void) ...@@ -246,7 +246,7 @@ static int rpcb_create_local_unix(void)
if (IS_ERR(clnt)) { if (IS_ERR(clnt)) {
dprintk("RPC: failed to create AF_LOCAL rpcbind " dprintk("RPC: failed to create AF_LOCAL rpcbind "
"client (errno %ld).\n", PTR_ERR(clnt)); "client (errno %ld).\n", PTR_ERR(clnt));
result = -PTR_ERR(clnt); result = PTR_ERR(clnt);
goto out; goto out;
} }
...@@ -293,7 +293,7 @@ static int rpcb_create_local_net(void) ...@@ -293,7 +293,7 @@ static int rpcb_create_local_net(void)
if (IS_ERR(clnt)) { if (IS_ERR(clnt)) {
dprintk("RPC: failed to create local rpcbind " dprintk("RPC: failed to create local rpcbind "
"client (errno %ld).\n", PTR_ERR(clnt)); "client (errno %ld).\n", PTR_ERR(clnt));
result = -PTR_ERR(clnt); result = PTR_ERR(clnt);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment