Skip to content

Commit 1d9d6fd

Browse files
danieljordan10davem330
authored andcommitted
net/tls: Fix flipped sign in async_wait.err assignment
sk->sk_err contains a positive number, yet async_wait.err wants the opposite. Fix the missed sign flip, which Jakub caught by inspection. Fixes: a42055e ("net/tls: Add support for async encryption of records for performance") Suggested-by: Jakub Kicinski <[email protected]> Signed-off-by: Daniel Jordan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent da353fa commit 1d9d6fd

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
@@ -459,7 +459,7 @@ static void tls_encrypt_done(struct crypto_async_request *req, int err)
459459

460460
/* If err is already set on socket, return the same code */
461461
if (sk->sk_err) {
462-
ctx->async_wait.err = sk->sk_err;
462+
ctx->async_wait.err = -sk->sk_err;
463463
} else {
464464
ctx->async_wait.err = err;
465465
tls_err_abort(sk, err);

0 commit comments

Comments
 (0)