Skip to content

Commit

Permalink
NFSv4.x: Fix a refcount leak in nfs_callback_up_net
Browse files Browse the repository at this point in the history
On error, the callers expect us to return without bumping
nn->cb_users[].

Signed-off-by: Trond Myklebust <[email protected]>
Cc: [email protected] # v3.7+
  • Loading branch information
trondmypd committed Aug 30, 2016
1 parent 52442f9 commit 98b0f80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,
err_socks:
svc_rpcb_cleanup(serv, net);
err_bind:
nn->cb_users[minorversion]--;
dprintk("NFS: Couldn't create callback socket: err = %d; "
"net = %p\n", ret, net);
return ret;
Expand Down

0 comments on commit 98b0f80

Please sign in to comment.