]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: tls: fix returned read length with async decrypt
authorJakub Kicinski <kuba@kernel.org>
Wed, 7 Feb 2024 01:18:24 +0000 (17:18 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:27 +0000 (09:51 +0100)
commitfdd926fd3449e610464c0298d8d36f29fa58918f
tree1d54dbb4db43bbd594627b1076c4bc6a342c8d59
parent754c9bab77a1b895b97bd99d754403c505bc79df
net: tls: fix returned read length with async decrypt

[ Upstream commit ac437a51ce662364062f704e321227f6728e6adc ]

We double count async, non-zc rx data. The previous fix was
lucky because if we fully zc async_copy_bytes is 0 so we add 0.
Decrypted already has all the bytes we handled, in all cases.
We don't have to adjust anything, delete the erroneous line.

Fixes: 4d42cd6bc2ac ("tls: rx: fix return value for async crypto")
Co-developed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls_sw.c