diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-02-06 17:18:24 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-23 09:24:52 +0100 |
commit | 6a67bf10934c8f78988ebcc583476f3a21b7f848 (patch) | |
tree | 3fc6a69d2a45c6a95d30def7a750fe9533ff2393 /net | |
parent | d684763534b969cca1022e2a28645c7cc91f7fa5 (diff) | |
download | linux-stable-6a67bf10934c8f78988ebcc583476f3a21b7f848.tar.gz linux-stable-6a67bf10934c8f78988ebcc583476f3a21b7f848.tar.bz2 linux-stable-6a67bf10934c8f78988ebcc583476f3a21b7f848.zip |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/tls/tls_sw.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 2af8b0873da6..e1f8ff6e9a73 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2132,7 +2132,6 @@ recv_end: else err = process_rx_list(ctx, msg, &control, 0, async_copy_bytes, is_peek); - decrypted += max(err, 0); } copied += decrypted; |