]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Fix insufficient receive notification generation
authorDavid Howells <dhowells@redhat.com>
Thu, 30 Jan 2020 21:50:36 +0000 (21:50 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 30 Jan 2020 21:50:41 +0000 (21:50 +0000)
commitd24f496e79f5ffa3c4b1b22e05f672b13451480b
treec0756fa7c369e29f1f834e934f0068f34b996b80
parent959fb771bb78635ddd8eb093cc9730c3728d8e43
rxrpc: Fix insufficient receive notification generation

In rxrpc_input_data(), rxrpc_notify_socket() is called if the base sequence
number of the packet is immediately following the hard-ack point at the end
of the function.  However, this isn't sufficient, since the recvmsg side
may have been advancing the window and then overrun the position in which
we're adding - at which point rx_hard_ack >= seq0 and no notification is
generated.

Fix this by always generating a notification at the end of the input
function.

Without this, a long call may stall, possibly indefinitely.

Fixes: a42fc64729e7 ("rxrpc: Rewrite the data and ack handling code")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/input.c