diff options
author | Daniel Jordan <daniel.m.jordan@oracle.com> | 2021-10-28 00:59:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-02 21:48:23 +0300 |
commit | 58722323d4bc7e7fb9e1e4397551f7a02f2f2757 (patch) | |
tree | de8634240a1ece45194c90e49549cce2c76ae7ad /net/tls | |
parent | 44e8c93e1e4960566b34beb85b73f5ab4a6b6e76 (diff) | |
download | linux-58722323d4bc7e7fb9e1e4397551f7a02f2f2757.tar.xz |
net/tls: Fix flipped sign in async_wait.err assignment
commit 1d9d6fd21ad4a28b16ed9ee5432ae738b9dc58aa upstream.
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: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_sw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index eda1a5d0ef0c..14cce61160a5 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -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); |