diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-07-20 07:57:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-15 15:04:09 -0400 |
commit | d90c97ba987ab9f1c0a1e11697269814386243b9 (patch) | |
tree | d74dccf3e9004dfc4564d2cfb32b247f5ce14a39 | |
parent | 5bf75ed61c9715435661971acd4e181c26f2af20 (diff) |
SUNRPC: return negative value in case rpcbind client creation error
commit caea33da898e4e14f0ba58173e3b7689981d2c0b 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: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/sunrpc/rpcb_clnt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index e45d2fbbe5a..bf0a7f64f00 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c | |||
@@ -193,7 +193,7 @@ static int rpcb_create_local_unix(void) | |||
193 | if (IS_ERR(clnt)) { | 193 | if (IS_ERR(clnt)) { |
194 | dprintk("RPC: failed to create AF_LOCAL rpcbind " | 194 | dprintk("RPC: failed to create AF_LOCAL rpcbind " |
195 | "client (errno %ld).\n", PTR_ERR(clnt)); | 195 | "client (errno %ld).\n", PTR_ERR(clnt)); |
196 | result = -PTR_ERR(clnt); | 196 | result = PTR_ERR(clnt); |
197 | goto out; | 197 | goto out; |
198 | } | 198 | } |
199 | 199 | ||
@@ -242,7 +242,7 @@ static int rpcb_create_local_net(void) | |||
242 | if (IS_ERR(clnt)) { | 242 | if (IS_ERR(clnt)) { |
243 | dprintk("RPC: failed to create local rpcbind " | 243 | dprintk("RPC: failed to create local rpcbind " |
244 | "client (errno %ld).\n", PTR_ERR(clnt)); | 244 | "client (errno %ld).\n", PTR_ERR(clnt)); |
245 | result = -PTR_ERR(clnt); | 245 | result = PTR_ERR(clnt); |
246 | goto out; | 246 | goto out; |
247 | } | 247 | } |
248 | 248 | ||