Skip to content

Commit

Permalink
rxrpc: Don't try to resend the request if we're receiving the reply
Browse files Browse the repository at this point in the history
[ Upstream commit 114af61 ]

rxrpc has a timer to trigger resending of unacked data packets in a call.
This is not cancelled when a client call switches to the receive phase on
the basis that most calls don't last long enough for it to ever expire.
However, if it *does* expire after we've started to receive the reply, we
shouldn't then go into trying to retransmit or pinging the server to find
out if an ack got lost.

Fix this by skipping the resend code if we're into receiving the reply to a
client call.

Fixes: 17926a7 ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
dhowells authored and gregkh committed Jun 9, 2022
1 parent 369de57 commit a1c22c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/rxrpc/call_event.c
Expand Up @@ -406,7 +406,8 @@ void rxrpc_process_call(struct work_struct *work)
goto recheck_state;
}

if (test_and_clear_bit(RXRPC_CALL_EV_RESEND, &call->events)) {
if (test_and_clear_bit(RXRPC_CALL_EV_RESEND, &call->events) &&
call->state != RXRPC_CALL_CLIENT_RECV_REPLY) {
rxrpc_resend(call, now);
goto recheck_state;
}
Expand Down

0 comments on commit a1c22c6

Please sign in to comment.