Commit caea33da898e4e14f0ba58173e3b7689981d2c0b

Authored by Stanislav Kinsbursky
Committed by Trond Myklebust
1 parent 89d77c8fa8

SUNRPC: return negative value in case rpcbind client creation error

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>
Cc: stable@vger.kernel.org [>= 3.0]

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

net/sunrpc/rpcb_clnt.c
... ... @@ -251,7 +251,7 @@
251 251 if (IS_ERR(clnt)) {
252 252 dprintk("RPC: failed to create AF_LOCAL rpcbind "
253 253 "client (errno %ld).\n", PTR_ERR(clnt));
254   - result = -PTR_ERR(clnt);
  254 + result = PTR_ERR(clnt);
255 255 goto out;
256 256 }
257 257  
... ... @@ -298,7 +298,7 @@
298 298 if (IS_ERR(clnt)) {
299 299 dprintk("RPC: failed to create local rpcbind "
300 300 "client (errno %ld).\n", PTR_ERR(clnt));
301   - result = -PTR_ERR(clnt);
  301 + result = PTR_ERR(clnt);
302 302 goto out;
303 303 }
304 304