NFSv4.x: Fix a refcount leak in nfs_callback_up_net
commit 98b0f80c2396224bbbed81792b526e6c72ba9efa upstream. On error, the callers expect us to return without bumping nn->cb_users[]. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ab8cf65350
commit
35c12ee60b
1 changed files with 1 additions and 0 deletions
|
@ -275,6 +275,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,
|
||||||
err_socks:
|
err_socks:
|
||||||
svc_rpcb_cleanup(serv, net);
|
svc_rpcb_cleanup(serv, net);
|
||||||
err_bind:
|
err_bind:
|
||||||
|
nn->cb_users[minorversion]--;
|
||||||
dprintk("NFS: Couldn't create callback socket: err = %d; "
|
dprintk("NFS: Couldn't create callback socket: err = %d; "
|
||||||
"net = %p\n", ret, net);
|
"net = %p\n", ret, net);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue