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:54:06 -0400
commit13312f0f2c1f9135934c3f68a80a261717c1503e (patch)
tree84397968ad652803755a4c5416c09348f6cae7ae /fs
parent4ff77f223a63b18745c4a202970682f138d056cc (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 351be9205bf8..3b8cdb8298c4 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;