diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-08-29 11:15:36 -0400 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-09-15 18:54:06 -0400 |
commit | 13312f0f2c1f9135934c3f68a80a261717c1503e (patch) | |
tree | 84397968ad652803755a4c5416c09348f6cae7ae /fs | |
parent | 4ff77f223a63b18745c4a202970682f138d056cc (diff) | |
download | lwn-13312f0f2c1f9135934c3f68a80a261717c1503e.tar.gz lwn-13312f0f2c1f9135934c3f68a80a261717c1503e.zip |
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.c | 1 |
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; |