rxrpc: Defer the response to a PING ACK until we've parsed it
authorDavid Howells <dhowells@redhat.com>
Thu, 16 Nov 2023 13:12:59 +0000 (13:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Nov 2023 02:50:33 +0000 (02:50 +0000)
commit1a01319feef7047aa2ba400ffa3e047776aa29ca
treeabe729bb13330d554adb393ab1f08bc2cb35b7bb
parent3798680f2fbbe0ca3ab6138b34e0d161c36497ee
rxrpc: Defer the response to a PING ACK until we've parsed it

Defer the generation of a PING RESPONSE ACK in response to a PING ACK until
we've parsed the PING ACK so that we pick up any changes to the packet
queue so that we can update ackinfo.

This is also applied to an ACK generated in response to an ACK with the
REQUEST_ACK flag set.

Note that whilst the problem was added in commit 248f219cb8bc, it didn't
really matter at that point because the ACK was proposed in softirq mode
and generated asynchronously later in process context, taking the latest
values at the time.  But this fix is only needed since the move to parse
incoming packets in an I/O thread rather than in softirq and generate the
ACK at point of proposal (b0346843b1076b34a0278ff601f8f287535cb064).

Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rxrpc/input.c