Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501734 > unrolled thread

[PATCH 3.12 34/84] NFSD: Using free_conn free connection

Started byJiri Slaby <jslaby@suse.cz>
First post2016-10-17 10:20 +0200
Last post2016-10-17 10:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.12 34/84] NFSD: Using free_conn free connection Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:20 +0200

#1501734 — [PATCH 3.12 34/84] NFSD: Using free_conn free connection

FromJiri Slaby <jslaby@suse.cz>
Date2016-10-17 10:20 +0200
Subject[PATCH 3.12 34/84] NFSD: Using free_conn free connection
Message-ID<stbjk-YS-37@gated-at.bofh.it>
From: Kinglong Mee <kinglongmee@gmail.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

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

commit 3f42d2c428c724212c5f4249daea97e254eb0546 upstream.

Connection from alloc_conn must be freed through free_conn,
otherwise, the reference of svc_xprt will never be put.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/nfsd/nfs4state.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 0a138e4fc2e0..689595b03659 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2270,7 +2270,8 @@ out:
 	if (!list_empty(&clp->cl_revoked))
 		seq->status_flags |= SEQ4_STATUS_RECALLABLE_STATE_REVOKED;
 out_no_session:
-	kfree(conn);
+	if (conn)
+		free_conn(conn);
 	spin_unlock(&nn->client_lock);
 	return status;
 out_put_session:
-- 
2.10.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web