Skip to content

Commit a7b1a48

Browse files
author
Trond Myklebust
committed
SUNRPC: Ignore queue transmission errors on successful transmission
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Tested-by: Chuck Lever <[email protected]>
1 parent dc4060a commit a7b1a48

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

net/sunrpc/clnt.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,8 +2081,8 @@ call_transmit_status(struct rpc_task *task)
20812081
* test first.
20822082
*/
20832083
if (rpc_task_transmitted(task)) {
2084-
if (task->tk_status == 0)
2085-
xprt_request_wait_receive(task);
2084+
task->tk_status = 0;
2085+
xprt_request_wait_receive(task);
20862086
return;
20872087
}
20882088

@@ -2167,6 +2167,9 @@ call_bc_transmit_status(struct rpc_task *task)
21672167
{
21682168
struct rpc_rqst *req = task->tk_rqstp;
21692169

2170+
if (rpc_task_transmitted(task))
2171+
task->tk_status = 0;
2172+
21702173
dprint_status(task);
21712174

21722175
switch (task->tk_status) {

0 commit comments

Comments
 (0)