Skip to content

Commit ac437a5

Browse files
kuba-moodavem330
authored andcommitted
net: tls: fix returned read length with async decrypt
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: 4d42cd6 ("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>
1 parent 49d8210 commit ac437a5

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

net/tls/tls_sw.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2132,7 +2132,6 @@ int tls_sw_recvmsg(struct sock *sk,
21322132
else
21332133
err = process_rx_list(ctx, msg, &control, 0,
21342134
async_copy_bytes, is_peek);
2135-
decrypted += max(err, 0);
21362135
}
21372136

21382137
copied += decrypted;

0 commit comments

Comments
 (0)