diff options
author | David Howells <dhowells@redhat.com> | 2020-09-30 23:54:44 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2020-10-15 13:28:00 +0100 |
commit | ddc7834af8d56c2c0e805f05493ba4a650c0344f (patch) | |
tree | 9d7b2fadb5667f2badd180de1759f33dcf80218b /net/rxrpc/conn_event.c | |
parent | f3af4ad1e08a8a9e61878b9f72751a5b76b3baf9 (diff) | |
download | linux-ddc7834af8d56c2c0e805f05493ba4a650c0344f.tar.gz linux-ddc7834af8d56c2c0e805f05493ba4a650c0344f.tar.bz2 linux-ddc7834af8d56c2c0e805f05493ba4a650c0344f.zip |
rxrpc: Fix loss of final ack on shutdown
Fix the loss of transmission of a call's final ack when a socket gets shut
down. This means that the server will retransmit the last data packet or
send a ping ack and then get an ICMP indicating the port got closed. The
server will then view this as a failure.
Fixes: 3136ef49a14c ("rxrpc: Delay terminal ACK transmission on a client call")
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_event.c')
-rw-r--r-- | net/rxrpc/conn_event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c index 6b7c6f4a82e3..aff184145ffa 100644 --- a/net/rxrpc/conn_event.c +++ b/net/rxrpc/conn_event.c @@ -397,7 +397,7 @@ abort: /* * Process delayed final ACKs that we haven't subsumed into a subsequent call. */ -static void rxrpc_process_delayed_final_acks(struct rxrpc_connection *conn) +void rxrpc_process_delayed_final_acks(struct rxrpc_connection *conn, bool force) { unsigned long j = jiffies, next_j; unsigned int channel; @@ -416,7 +416,7 @@ again: smp_rmb(); /* vs rxrpc_disconnect_client_call */ ack_at = READ_ONCE(chan->final_ack_at); - if (time_before(j, ack_at)) { + if (time_before(j, ack_at) && !force) { if (time_before(ack_at, next_j)) { next_j = ack_at; set = true; @@ -450,7 +450,7 @@ static void rxrpc_do_process_connection(struct rxrpc_connection *conn) /* Process delayed ACKs whose time has come. */ if (conn->flags & RXRPC_CONN_FINAL_ACK_MASK) - rxrpc_process_delayed_final_acks(conn); + rxrpc_process_delayed_final_acks(conn, false); /* go through the conn-level event packets, releasing the ref on this * connection that each one has when we've finished with it */ |