]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Fix handling of rwind from an ACK packet
authorDavid Howells <dhowells@redhat.com>
Wed, 17 Jun 2020 22:01:23 +0000 (23:01 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 17 Jun 2020 22:01:32 +0000 (23:01 +0100)
commit1f2d5d4d9be0e87ba974d8218ee7121aa20df4fa
tree1222338cec6c4b62cc88fd5b8d804151c79d081a
parent2760f6cd075595dc36924f9c0a298085ae6db59e
rxrpc: Fix handling of rwind from an ACK packet

The handling of the receive window size (rwind) from a received ACK packet
is not correct.  The rxrpc_input_ackinfo() function currently checks the
current Tx window size against the rwind from the ACK to see if it has
changed, but then limits the rwind size before storing it in the tx_winsize
member and, if it increased, wake up the transmitting process.  This means
that if rwind > RXRPC_RXTX_BUFF_SIZE - 1, this path will always be
followed.

Fix this by limiting rwind before we compare it to tx_winsize.

The effect of this can be seen by enabling the rxrpc_rx_rwind_change
tracepoint.

Fixes: f79d43a550cf ("rxrpc: Wake up the transmitter if Rx window size increases on the peer")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/input.c