From: Kinglong Mee <kinglongmee@gmail.com>
To: "J. Bruce Fields" <bfields@fieldses.org>, linux-nfs@vger.kernel.org
Cc: Chuck Lever <chuck.lever@oracle.com>,
Kinglong Mee <kinglongmee@gmail.com>
Subject: [PATCH] SUNRPC: Make sure authorize svc when meeting SVC_CLOSE
Date: Mon, 16 Jan 2017 08:23:37 +0800 [thread overview]
Message-ID: <090f6673-1bb3-d626-e27e-6be5afcda782@gmail.com> (raw)
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
next reply other threads:[~2017-01-16 0:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-16 0:23 Kinglong Mee [this message]
2017-01-18 22:20 ` [PATCH] SUNRPC: Make sure authorize svc when meeting SVC_CLOSE J. Bruce Fields
2017-03-10 1:37 ` Kinglong Mee
2017-03-10 1:39 ` Kinglong Mee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=090f6673-1bb3-d626-e27e-6be5afcda782@gmail.com \
--to=kinglongmee@gmail.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).