]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commit548ca37f32f6896197815ea55024881f81fff19e
treed8d10040712ec454e5096fc5cb53bda827cb53a2
parenta07a3cf76d57873683e63d4c4909c4ebef546247
rxrpc: Fix Tx ring annotation after initial Tx failure

BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit 03877bf6a30cca7d4bc3ffabd3c3e9464a7a1a19 ]

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: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/rxrpc/sendmsg.c