Commit ac437a51 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller
Browse files

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: 4d42cd6b ("tls: rx: fix return value for async crypto")
Co-developed-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49d82106
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2132,7 +2132,6 @@ int tls_sw_recvmsg(struct sock *sk,
		else
			err = process_rx_list(ctx, msg, &control, 0,
					      async_copy_bytes, is_peek);
		decrypted += max(err, 0);
	}

	copied += decrypted;