Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1501695
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.12 60/84] svc: Avoid garbage replies when pc_func() returns rpc_drop_reply |
| Date | 2016-10-17 10:10 +0200 |
| Message-ID | <stb9E-Tq-45@gated-at.bofh.it> (permalink) |
| References | <staZY-A3-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Chuck Lever <chuck.lever@oracle.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 0533b13072f4bf35738290d2cf9e299c7bc6c42a upstream.
If an RPC program does not set vs_dispatch and pc_func() returns
rpc_drop_reply, the server sends a reply anyway containing a single
word containing the value RPC_DROP_REPLY (in network byte-order, of
course). This is a nonsense RPC message.
Fixes: 9e701c610923 ("svcrpc: simpler request dropping")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
net/sunrpc/svc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index b974571126fe..e7e552a07f6f 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1182,7 +1182,8 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
*statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
/* Encode reply */
- if (rqstp->rq_dropme) {
+ if (*statp == rpc_drop_reply ||
+ rqstp->rq_dropme) {
if (procp->pc_release)
procp->pc_release(rqstp, NULL, rqstp->rq_resp);
goto dropit;
--
2.10.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.12 60/84] svc: Avoid garbage replies when pc_func() returns rpc_drop_reply Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:10 +0200
csiph-web