]> git.baikalelectronics.ru Git - kernel.git/commit
net: tls: fix device-offloaded sendpage straddling records
authorJakub Kicinski <kuba@kernel.org>
Sat, 4 Mar 2023 19:26:10 +0000 (11:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:50:26 +0000 (08:50 +0100)
commit45570d6202280caf9c9d9b1c6314208c1378c270
tree4675398cc083d6ecb9a8b57d8f765bb725714255
parent7dfe856fde7812e0c911b8275c97d3d207b2ac30
net: tls: fix device-offloaded sendpage straddling records

[ Upstream commit 3a8f8a890bf5a6aee108d513e8a84376fdad7c5b ]

Adrien reports that incorrect data is transmitted when a single
page straddles multiple records. We would transmit the same
data in all iterations of the loop.

Reported-by: Adrien Moulin <amoulin@corp.free.fr>
Link: https://lore.kernel.org/all/61481278.42813558.1677845235112.JavaMail.zimbra@corp.free.fr
Fixes: ec84279dcc1d ("tls: Add opt-in zerocopy mode of sendfile()")
Tested-by: Adrien Moulin <amoulin@corp.free.fr>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Acked-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Link: https://lore.kernel.org/r/20230304192610.3818098-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls_device.c