]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
sock: fix sg page frag coalescing in sk_alloc_sg
authorDaniel Borkmann <daniel@iogearbox.net>
Mon, 23 Jul 2018 20:37:54 +0000 (22:37 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:22 +0000 (14:20 +0100)
commite03ad33acd2812e86ec9e3d29e525394abc336b9
tree17cacd804bcac439c03aed23fe799ac98232307c
parent380fc14b097e9f0e5d8fbdab004f96ccbf678de9
sock: fix sg page frag coalescing in sk_alloc_sg

BugLink: http://bugs.launchpad.net/bugs/1814813
[ Upstream commit 144fe2bfd236dc814eae587aea7e2af03dbdd755 ]

Current sg coalescing logic in sk_alloc_sg() (latter is used by tls and
sockmap) is not quite correct in that we do fetch the previous sg entry,
however the subsequent check whether the refilled page frag from the
socket is still the same as from the last entry with prior offset and
length matching the start of the current buffer is comparing always the
first sg list entry instead of the prior one.

Fixes: 3c4d7559159b ("tls: kernel TLS support")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/tls/tls_sw.c