* Patch "svc: Avoid garbage replies when pc_func() returns rpc_drop_reply" has been added to the 4.4-stable tree
@ 2016-10-05 13:20 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-10-05 13:20 UTC (permalink / raw)
To: chuck.lever, Anna.Schumaker, gregkh, swise; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
svc: Avoid garbage replies when pc_func() returns rpc_drop_reply
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
svc-avoid-garbage-replies-when-pc_func-returns-rpc_drop_reply.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 0533b13072f4bf35738290d2cf9e299c7bc6c42a Mon Sep 17 00:00:00 2001
From: Chuck Lever <chuck.lever@oracle.com>
Date: Wed, 29 Jun 2016 13:55:14 -0400
Subject: svc: Avoid garbage replies when pc_func() returns rpc_drop_reply
From: Chuck Lever <chuck.lever@oracle.com>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sunrpc/svc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1188,7 +1188,8 @@ svc_process_common(struct svc_rqst *rqst
*statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
/* Encode reply */
- if (test_bit(RQ_DROPME, &rqstp->rq_flags)) {
+ if (*statp == rpc_drop_reply ||
+ test_bit(RQ_DROPME, &rqstp->rq_flags)) {
if (procp->pc_release)
procp->pc_release(rqstp, NULL, rqstp->rq_resp);
goto dropit;
Patches currently in stable-queue which might be from chuck.lever@oracle.com are
queue-4.4/svc-avoid-garbage-replies-when-pc_func-returns-rpc_drop_reply.patch
queue-4.4/nfs-don-t-drop-cb-requests-with-invalid-principals.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-05 13:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-05 13:20 Patch "svc: Avoid garbage replies when pc_func() returns rpc_drop_reply" has been added to the 4.4-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.