summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-08-29 11:15:36 -0400
committerJiri Slaby <jslaby@suse.cz>2016-09-29 11:14:22 +0200
commit55377ee2f5c04bc79c22cec747daf687540eb35f (patch)
treebf9fbc9bd406cb1d77a26f8e6b161ac7291508ad /fs/nfs
parent78d6a2c928a0cbf0d38f42dc366adf66ca141cbe (diff)
downloadlinux-stable-55377ee2f5c04bc79c22cec747daf687540eb35f.tar.gz
linux-stable-55377ee2f5c04bc79c22cec747daf687540eb35f.tar.bz2
linux-stable-55377ee2f5c04bc79c22cec747daf687540eb35f.zip
NFSv4.x: Fix a refcount leak in nfs_callback_up_net
commit 98b0f80c2396224bbbed81792b526e6c72ba9efa upstream. On error, the callers expect us to return without bumping nn->cb_users[]. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs/nfs')
-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 50443e6dc033..9c98225e45cd 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -302,6 +302,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;