Skip to content

Commit dba8533

Browse files
dhowellsgregkh
authored andcommitted
rxrpc: Fix insufficient receive notification generation
[ Upstream commit f71dbf2 ] 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 85c45a4 commit dba8533

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
@@ -612,10 +612,8 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb,
612612
false, true,
613613
rxrpc_propose_ack_input_data);
614614

615-
if (sp->hdr.seq == READ_ONCE(call->rx_hard_ack) + 1) {
616-
trace_rxrpc_notify_socket(call->debug_id, serial);
617-
rxrpc_notify_socket(call);
618-
}
615+
trace_rxrpc_notify_socket(call->debug_id, serial);
616+
rxrpc_notify_socket(call);
619617

620618
unlock:
621619
spin_unlock(&call->input_lock);

0 commit comments

Comments
 (0)