Commit c512940b authored by Trond Myklebust's avatar Trond Myklebust Committed by Ben Hutchings

NFSv4.x: Fix a refcount leak in nfs_callback_up_net

commit 98b0f80c upstream.

On error, the callers expect us to return without bumping
nn->cb_users[].
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent e5170157
...@@ -301,6 +301,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv, struct n ...@@ -301,6 +301,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv, struct n
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;
......
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