diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-07-20 15:57:48 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-15 12:04:09 -0700 |
commit | d90c97ba987ab9f1c0a1e11697269814386243b9 (patch) | |
tree | d74dccf3e9004dfc4564d2cfb32b247f5ce14a39 /net/sunrpc | |
parent | 5bf75ed61c9715435661971acd4e181c26f2af20 (diff) | |
download | linux-stable-d90c97ba987ab9f1c0a1e11697269814386243b9.tar.gz linux-stable-d90c97ba987ab9f1c0a1e11697269814386243b9.tar.bz2 linux-stable-d90c97ba987ab9f1c0a1e11697269814386243b9.zip |
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>
Diffstat (limited to 'net/sunrpc')
-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 e45d2fbbe5a8..bf0a7f64f000 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -193,7 +193,7 @@ static int rpcb_create_local_unix(void) if (IS_ERR(clnt)) { dprintk("RPC: failed to create AF_LOCAL rpcbind " "client (errno %ld).\n", PTR_ERR(clnt)); - result = -PTR_ERR(clnt); + result = PTR_ERR(clnt); goto out; } @@ -242,7 +242,7 @@ static int rpcb_create_local_net(void) if (IS_ERR(clnt)) { dprintk("RPC: failed to create local rpcbind " "client (errno %ld).\n", PTR_ERR(clnt)); - result = -PTR_ERR(clnt); + result = PTR_ERR(clnt); goto out; } |