summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2016-02-15 10:23:59 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-10 10:26:00 +0200
commitbf91224b2da8527d1ab5846c4f6881f51fe7d753 (patch)
tree23ef1cd8cf46f2f8b2bf7b919865df88998db78a
parentda65456fe6bb42ce487e7170ec8b9e653feabec4 (diff)
downloadlinux-stable-bf91224b2da8527d1ab5846c4f6881f51fe7d753.tar.gz
linux-stable-bf91224b2da8527d1ab5846c4f6881f51fe7d753.tar.bz2
linux-stable-bf91224b2da8527d1ab5846c4f6881f51fe7d753.zip
xprtrdma: rpcrdma_bc_receive_call() should init rq_private_buf.len
commit 9f74660bcf1e4cca577be99e54bc77b5df62b508 upstream. Some NFSv4.1 OPEN requests were hanging waiting for the NFS server to finish recalling delegations. Turns out that each NFSv4.1 CB request on RDMA gets a GARBAGE_ARGS reply from the Linux client. Commit 756b9b37cfb2e3dc added a line in bc_svc_process that overwrites the incoming rq_rcv_buf's length with the value in rq_private_buf.len. But rpcrdma_bc_receive_call() does not invoke xprt_complete_bc_request(), thus rq_private_buf.len is not initialized. svc_process_common() is invoked with a zero-length RPC message, and fails. Fixes: 756b9b37cfb2e3dc ('SUNRPC: Fix callback channel') Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/sunrpc/xprtrdma/backchannel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
index 40f48c62f9b1..f66ddaf47829 100644
--- a/net/sunrpc/xprtrdma/backchannel.c
+++ b/net/sunrpc/xprtrdma/backchannel.c
@@ -337,6 +337,8 @@ void rpcrdma_bc_receive_call(struct rpcrdma_xprt *r_xprt,
rqst->rq_reply_bytes_recvd = 0;
rqst->rq_bytes_sent = 0;
rqst->rq_xid = headerp->rm_xid;
+
+ rqst->rq_private_buf.len = size;
set_bit(RPC_BC_PA_IN_USE, &rqst->rq_bc_pa_state);
buf = &rqst->rq_rcv_buf;