summaryrefslogtreecommitdiff
path: root/net/rxrpc
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-01-30 21:50:36 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-14 16:30:58 -0500
commit362f28fc8d268cb92e83c3fc5b699e3878de51a7 (patch)
tree977bca26d004de356e4ebe868b4914d5f47490f9 /net/rxrpc
parentb974ac51f5834a729de252fc5c1c9de9efd79b45 (diff)
downloadlinux-rt-362f28fc8d268cb92e83c3fc5b699e3878de51a7.tar.gz
rxrpc: Fix insufficient receive notification generation
[ Upstream commit f71dbf2fb28489a79bde0dca1c8adfb9cdb20a6b ] 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: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/rxrpc')
-rw-r--r--net/rxrpc/input.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index a4380e182e6c..f0ccc6a04c7a 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -582,8 +582,7 @@ ack:
immediate_ack, true,
rxrpc_propose_ack_input_data);
- if (sp->hdr.seq == READ_ONCE(call->rx_hard_ack) + 1)
- rxrpc_notify_socket(call);
+ rxrpc_notify_socket(call);
_leave(" [queued]");
}