[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1486322541-8206-70-git-send-email-w@1wt.eu>
Date: Sun, 5 Feb 2017 20:19:51 +0100
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
linux@...ck-us.net
Cc: Trond Myklebust <trond.myklebust@...marydata.com>,
Willy Tarreau <w@....eu>
Subject: [PATCH 3.10 169/319] NFSv4.x: Fix a refcount leak in nfs_callback_up_net
From: Trond Myklebust <trond.myklebust@...marydata.com>
commit 98b0f80c2396224bbbed81792b526e6c72ba9efa upstream.
On error, the callers expect us to return without bumping
nn->cb_users[].
Signed-off-by: Trond Myklebust <trond.myklebust@...marydata.com>
Signed-off-by: Willy Tarreau <w@....eu>
---
fs/nfs/callback.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index e05c96e..57d3b5e 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;
--
2.8.0.rc2.1.gbe9624a
Powered by blists - more mailing lists