linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SUNRPC: Make sure authorize svc when meeting SVC_CLOSE
@ 2017-01-16  0:23 Kinglong Mee
  2017-01-18 22:20 ` J. Bruce Fields
  0 siblings, 1 reply; 4+ messages in thread
From: Kinglong Mee @ 2017-01-16  0:23 UTC (permalink / raw)
  To: J. Bruce Fields, linux-nfs; +Cc: Chuck Lever, Kinglong Mee

Commit 4d712ef1db05 "svcauth_gss: Close connection when
 dropping an incoming message" will close connection,
but forget authorizing the svc when meeting SVC_CLOSE.

That, there will be an module reference to sunrpc,
and some memory leak.

When mounting an nfs filesystem, the reference leak increase one.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 net/sunrpc/svc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 75f290b..63ca2ea 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1155,6 +1155,11 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
 	case SVC_DENIED:
 		goto err_bad_auth;
 	case SVC_CLOSE:
+		/*
+		 * Makesure authorise svc if progp->pg_authenticate fail,
+		 * it's harmless if svc_authenticate fail.
+		 */
+		svc_authorise(rqstp);
 		goto close;
 	case SVC_DROP:
 		goto dropit;
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-10  1:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-16  0:23 [PATCH] SUNRPC: Make sure authorize svc when meeting SVC_CLOSE Kinglong Mee
2017-01-18 22:20 ` J. Bruce Fields
2017-03-10  1:37   ` Kinglong Mee
2017-03-10  1:39     ` Kinglong Mee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).