summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-08-29 11:15:36 -0400
committerSasha Levin <alexander.levin@verizon.com>2016-09-15 18:53:30 -0400
commit99663cdecfa076d80d3a1f4bbfb9b3fc13c0a09a (patch)
tree98d3a71039e4fd718e7931e1b09f770994348570 /fs
parentf6b02c5ad3417caff26f3a5b41cf81d152df569c (diff)
NFSv4.x: Fix a refcount leak in nfs_callback_up_net
[ Upstream commit 98b0f80c2396224bbbed81792b526e6c72ba9efa ] On error, the callers expect us to return without bumping nn->cb_users[]. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Cc: stable@vger.kernel.org # v3.7+ Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/callback.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 8d129bb7355a..a78558a25035 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -303,6 +303,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv, struct n
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;