Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13312f0f authored by Trond Myklebust's avatar Trond Myklebust Committed by Sasha Levin
Browse files

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: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Cc: stable@vger.kernel.org # v3.7+
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 4ff77f22
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;