Skip to content

Commit

Permalink
SUNRPC: Ignore queue transmission errors on successful transmission
Browse files Browse the repository at this point in the history
If a request transmission fails due to write space or slot unavailability
errors, but the queued task then gets transmitted before it has time to
process the error in call_transmit_status() or call_bc_transmit_status(),
we need to suppress the transmission error code to prevent it from leaking
out of the RPC layer.

Reported-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Tested-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
Trond Myklebust committed Apr 17, 2019
1 parent dc4060a commit a7b1a48
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2081,8 +2081,8 @@ call_transmit_status(struct rpc_task *task)
* test first.
*/
if (rpc_task_transmitted(task)) {
if (task->tk_status == 0)
xprt_request_wait_receive(task);
task->tk_status = 0;
xprt_request_wait_receive(task);
return;
}

Expand Down Expand Up @@ -2167,6 +2167,9 @@ call_bc_transmit_status(struct rpc_task *task)
{
struct rpc_rqst *req = task->tk_rqstp;

if (rpc_task_transmitted(task))
task->tk_status = 0;

dprint_status(task);

switch (task->tk_status) {
Expand Down

0 comments on commit a7b1a48

Please sign in to comment.