]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Fix Tx ring annotation after initial Tx failure
authorDavid Howells <dhowells@redhat.com>
Fri, 30 Mar 2018 20:04:43 +0000 (21:04 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 30 Mar 2018 20:04:43 +0000 (21:04 +0100)
commit521cc70a67d32fc9a9581a3695b7de0b94ffc9b0
tree5592f86c9ada53d5c46d2653f91b50714c939dee
parent4dd02f5312e8af230414270a176430a9a8421cde
rxrpc: Fix Tx ring annotation after initial Tx failure

rxrpc calls have a ring of packets that are awaiting ACK or retransmission
and a parallel ring of annotations that tracks the state of those packets.
If the initial transmission of a packet on the underlying UDP socket fails
then the packet annotation is marked for resend - but the setting of this
mark accidentally erases the last-packet mark also stored in the same
annotation slot.  If this happens, a call won't switch out of the Tx phase
when all the packets have been transmitted.

Fix this by retaining the last-packet mark and only altering the packet
state.

Fixes: 8ca8ea452fc6 ("rxrpc: Rewrite the data and ack handling code")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/sendmsg.c