Thread (43 messages) 43 messages, 1 author, 2016-09-29
STALE3588d

[patch added to 3.12-stable] NFSv4.x: Fix a refcount leak in nfs_callback_up_net

From: Jiri Slaby <hidden>
Date: 2016-09-29 09:06:59
Subsystem: filesystems (vfs and infrastructure), nfs, sunrpc, and lockd clients, the rest · Maintainers: Alexander Viro, Christian Brauner, Trond Myklebust, Anna Schumaker, Linus Torvalds

From: Trond Myklebust <redacted>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 98b0f80c2396224bbbed81792b526e6c72ba9efa upstream.

On error, the callers expect us to return without bumping
nn->cb_users[].

Signed-off-by: Trond Myklebust <redacted>
Signed-off-by: Jiri Slaby <redacted>
---
 fs/nfs/callback.c | 1 +
 1 file changed, 1 insertion(+)
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;
-- 
2.10.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help