Skip to content

Commit 98b0f80

Browse files
committed
NFSv4.x: Fix a refcount leak in nfs_callback_up_net
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+
1 parent 52442f9 commit 98b0f80

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/callback.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,
275275
err_socks:
276276
svc_rpcb_cleanup(serv, net);
277277
err_bind:
278+
nn->cb_users[minorversion]--;
278279
dprintk("NFS: Couldn't create callback socket: err = %d; "
279280
"net = %p\n", ret, net);
280281
return ret;

0 commit comments

Comments
 (0)