Patch "rxrpc: Wake up the transmitter if Rx window size increases on the peer" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
rxrpc: Wake up the transmitter if Rx window size increases on the peer
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rxrpc-wake-up-the-transmitter-if-rx-window-size-increases-on-the-peer.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Dec 18 14:12:34 CET 2017
From: David Howells <[email protected]>
Date: Fri, 10 Mar 2017 07:48:49 +0000
Subject: rxrpc: Wake up the transmitter if Rx window size increases on the peer
From: David Howells <[email protected]>
[ Upstream commit 702f2ac87a9a8da23bf8506466bc70175fc970b2 ]
The RxRPC ACK packet may contain an extension that includes the peer's current Rx window size for this call. We adjust the local Tx window size to match. However, the transmitter can stall if the receive window is reduced to 0 by the peer and then reopened.
This is because the normal way that the transmitter is re-energised is by dropping something out of our Tx queue and thus making space. When a single gap is made, the transmitter is woken up. However, because there's nothing in the Tx queue at this point, this doesn't happen.
To fix this, perform a wake_up() any time we see the peer's Rx window size increasing.
The observable symptom is that calls start failing on ETIMEDOUT and the following:
kAFS: SERVER DEAD state=-62
appears in dmesg.
--- net/rxrpc/input.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
net/rxrpc/input.c +12 -3
@@ -649,6 +649,7 @@ static void rxrpc_input_ackinfo(struct rstruct rxrpc_skb_priv *sp =rxrpc_skb (skb);struct rxrpc_peer *peer;unsigned int mtu; +bool wake = false;u32 rwind =ntohl (ackinfo->rwind); _proto("Rx ACK %%%u Info { rx=%u max=%u rwin=%u jm=%u }",
@@ -656,9 +657,14 @@ static void rxrpc_input_ackinfo(struct rntohl (ackinfo->rxMTU),ntohl (ackinfo->maxMTU), rwind, ntohl(ackinfo->jumbo_max)); -if (rwind >RXRPC_RXTX_BUFF_SIZE -1 ) - rwind =RXRPC_RXTX_BUFF_SIZE -1 ; - call->tx_winsize = rwind; +if (call->tx_winsize != rwind) { +if (rwind >RXRPC_RXTX_BUFF_SIZE -1 ) + rwind =RXRPC_RXTX_BUFF_SIZE -1 ; +if (rwind > call->tx_winsize) + wake = true; + call->tx_winsize = rwind; + } +if (call->cong_ssthresh > rwind) call->cong_ssthresh = rwind;
@@ -672,6 +678,9 @@ static void rxrpc_input_ackinfo(struct rspin_unlock_bh (&peer->lock);_net ("Net MTU %u (maxdata %u)" , peer->mtu, peer->maxdata); } + +if (wake) +wake_up (&call->waitq); }/*
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/afs-flush-outstanding-writes-when-an-fd-is-closed.patch queue-4.9/afs-fix-the-maths-in-afs_fs_store_data.patch queue-4.9/afs-populate-group-id-from-vnode-status.patch queue-4.9/afs-prevent-callback-expiry-timer-overflow.patch queue-4.9/crypto-rsa-fix-buffer-overread-when-stripping-leading-zeroes.patch queue-4.9/afs-adjust-mode-bits-processing.patch queue-4.9/rxrpc-wake-up-the-transmitter-if-rx-window-size-increases-on-the-peer.patch queue-4.9/afs-invalid-op-id-should-abort-with-rxgen_opcode.patch queue-4.9/afs-fix-page-leak-in-afs_write_begin.patch queue-4.9/afs-better-abort-and-net-error-handling.patch queue-4.9/afs-fix-missing-put_page.patch queue-4.9/afs-migrate-vlocation-fields-to-64-bit.patch queue-4.9/rxrpc-ignore-busy-packets-on-old-calls.patch queue-4.9/afs-populate-and-use-client-modification-time.patch queue-4.9/afs-fix-afs_kill_pages.patch queue-4.9/afs-fix-abort-on-signal-while-waiting-for-call-completion.patch