]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
rxrpc: Fix handling of last subpacket of jumbo packet
authorDavid Howells <dhowells@redhat.com>
Thu, 31 Oct 2019 12:13:46 +0000 (12:13 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:47:40 +0000 (18:47 +0100)
commit9622e9f4cb09c9220632a6378be447d9faecb450
tree7f44eb15678e15842f08d35c83326f54fd597766
parentf28e10e37a12c3f3faa5ce6266433524bf1d4850
rxrpc: Fix handling of last subpacket of jumbo packet

BugLink: https://bugs.launchpad.net/bugs/1852111
[ Upstream commit f9c32435ab7221d1d6cb35738fa85a2da012b23e ]

When rxrpc_recvmsg_data() sets the return value to 1 because it's drained
all the data for the last packet, it checks the last-packet flag on the
whole packet - but this is wrong, since the last-packet flag is only set on
the final subpacket of the last jumbo packet.  This means that a call that
receives its last packet in a jumbo packet won't complete properly.

Fix this by having rxrpc_locate_data() determine the last-packet state of
the subpacket it's looking at and passing that back to the caller rather
than having the caller look in the packet header.  The caller then needs to
cache this in the rxrpc_call struct as rxrpc_locate_data() isn't then
called again for this packet.

Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code")
Fixes: e2de6c404898 ("rxrpc: Use info in skbuff instead of reparsing a jumbo packet")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/rxrpc/ar-internal.h
net/rxrpc/recvmsg.c