rxrpc: Don't let ack.previousPacket regress
[ Upstream commit 81524b6312535897707f2942695da1d359a5e56b ]
The previousPacket field in the rx ACK packet should never go backwards -
it's now the highest DATA sequence number received, not the last on
received (it used to be used for out of sequence detection).
Fixes: 248f219cb8
("rxrpc: Rewrite the data and ack handling code")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
573de88fc1
commit
3eef677a25
@@ -453,7 +453,6 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb)
|
||||
!rxrpc_receiving_reply(call))
|
||||
goto unlock;
|
||||
|
||||
call->ackr_prev_seq = seq0;
|
||||
hard_ack = READ_ONCE(call->rx_hard_ack);
|
||||
|
||||
nr_subpackets = sp->nr_subpackets;
|
||||
@@ -534,6 +533,9 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb)
|
||||
ack_serial = serial;
|
||||
}
|
||||
|
||||
if (after(seq0, call->ackr_highest_seq))
|
||||
call->ackr_highest_seq = seq0;
|
||||
|
||||
/* Queue the packet. We use a couple of memory barriers here as need
|
||||
* to make sure that rx_top is perceived to be set after the buffer
|
||||
* pointer and that the buffer pointer is set after the annotation and
|
||||
|
Reference in New Issue
Block a user