Skip to content

Commit

Permalink
net/tls: Fix flipped sign in async_wait.err assignment
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
danieljordan10 authored and davem330 committed Oct 28, 2021
1 parent da353fa commit 1d9d6fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/tls/tls_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static void tls_encrypt_done(struct crypto_async_request *req, int err)

/* If err is already set on socket, return the same code */
if (sk->sk_err) {
ctx->async_wait.err = sk->sk_err;
ctx->async_wait.err = -sk->sk_err;
} else {
ctx->async_wait.err = err;
tls_err_abort(sk, err);
Expand Down

0 comments on commit 1d9d6fd

Please sign in to comment.