diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-08-29 11:15:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-24 10:07:36 +0200 |
commit | 35c12ee60b5cd3d4531a36d07ca12c43484c3a19 (patch) | |
tree | 775fc806df7b01cd024bf8b5b89e16bf68717e56 /fs | |
parent | ab8cf653505e6f9194b7be41388941dcc7560ef9 (diff) | |
download | lwn-35c12ee60b5cd3d4531a36d07ca12c43484c3a19.tar.gz lwn-35c12ee60b5cd3d4531a36d07ca12c43484c3a19.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 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; |