Skip to content

Commit f71dbf2

Browse files
committed
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: 248f219 ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells <[email protected]>
1 parent fac20b9 commit f71dbf2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/rxrpc/input.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,8 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb)
599599
false, true,
600600
rxrpc_propose_ack_input_data);
601601

602-
if (seq0 == READ_ONCE(call->rx_hard_ack) + 1) {
603-
trace_rxrpc_notify_socket(call->debug_id, serial);
604-
rxrpc_notify_socket(call);
605-
}
602+
trace_rxrpc_notify_socket(call->debug_id, serial);
603+
rxrpc_notify_socket(call);
606604

607605
unlock:
608606
spin_unlock(&call->input_lock);

0 commit comments

Comments
 (0)