summaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-08-29 17:15:36 +0200
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-08-30 15:26:57 +0200
commit98b0f80c2396224bbbed81792b526e6c72ba9efa (patch)
tree1083c4f2618e7c0e9e1e648ad67600e0824df176 /fs/nfs/callback.c
parentNFS4: Avoid migration loops (diff)
downloadlinux-98b0f80c2396224bbbed81792b526e6c72ba9efa.tar.xz
linux-98b0f80c2396224bbbed81792b526e6c72ba9efa.zip
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 <trond.myklebust@primarydata.com> Cc: stable@vger.kernel.org # v3.7+
Diffstat (limited to 'fs/nfs/callback.c')
-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 a7f2e6e33305..52a28311e2a4 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -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;