summaryrefslogtreecommitdiff
path: root/net/rxrpc
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-01-31 00:50:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-11 15:33:54 +0300
commitdba85332fdba4ce3f94a9c8e1137b8b29b06facb (patch)
treeecd0bbde69088ae364ff4665bb9abc0796be20e1 /net/rxrpc
parent85c45a480561e0dfc95d9707db2d71dfceac47bc (diff)
downloadlinux-dba85332fdba4ce3f94a9c8e1137b8b29b06facb.tar.xz
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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 2f91ab909191..d9beb28fc32f 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -612,10 +612,8 @@ ack:
false, true,
rxrpc_propose_ack_input_data);
- if (sp->hdr.seq == READ_ONCE(call->rx_hard_ack) + 1) {
- trace_rxrpc_notify_socket(call->debug_id, serial);
- rxrpc_notify_socket(call);
- }
+ trace_rxrpc_notify_socket(call->debug_id, serial);
+ rxrpc_notify_socket(call);
unlock:
spin_unlock(&call->input_lock);