diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2016-06-29 13:55:14 -0400 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:58:39 +0200 |
| commit | 99ce11355d50f06183b1082ed32aa70cb2ec6d51 (patch) | |
| tree | ed4499f2bc38c2f10855132ca05a0b5d7c3e1e22 /net | |
| parent | 1d68297aaf84668954e113ccf5e4164bc35f2d4d (diff) | |
svc: Avoid garbage replies when pc_func() returns rpc_drop_reply
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: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'net')
| -rw-r--r-- | net/sunrpc/svc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 6dee8fbb3..c996a71fc 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; |
