Skip to content

Commit 4d42cd6

Browse files
committed
tls: rx: fix return value for async crypto
Gaurav reports that TLS Rx is broken with async crypto accelerators. The commit under fixes missed updating the retval byte counting logic when updating how records are stored. Even tho both before and after the change 'decrypted' was updated inside the main loop, it was completely overwritten when processing the async completions. Now that the rx_list only holds non-zero-copy records we need to add, not overwrite. Reported-and-bisected-by: Gaurav Jain <[email protected]> Fixes: cbbdee9 ("tls: rx: async: don't put async zc on the list") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217064 Tested-by: Gaurav Jain <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ca643cc commit 4d42cd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tls/tls_sw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2127,7 +2127,7 @@ int tls_sw_recvmsg(struct sock *sk,
21272127
else
21282128
err = process_rx_list(ctx, msg, &control, 0,
21292129
async_copy_bytes, is_peek);
2130-
decrypted = max(err, 0);
2130+
decrypted += max(err, 0);
21312131
}
21322132

21332133
copied += decrypted;

0 commit comments

Comments
 (0)