[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211027215921.1187090-2-daniel.m.jordan@oracle.com>
Date: Wed, 27 Oct 2021 17:59:21 -0400
From: Daniel Jordan <daniel.m.jordan@...cle.com>
To: Boris Pismenny <borisp@...dia.com>,
John Fastabend <john.fastabend@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Dave Watson <davejwatson@...com>,
Vakul Garg <vakul.garg@....com>
Cc: netdev@...r.kernel.org, Daniel Jordan <daniel.m.jordan@...cle.com>
Subject: [PATCH net v2 2/2] 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: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance")
Suggested-by: Jakub Kicinski <kuba@...nel.org>
Signed-off-by: Daniel Jordan <daniel.m.jordan@...cle.com>
---
net/tls/tls_sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 1644f8baea19..1b08b877a890 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);
--
2.33.0
Powered by blists - more mailing lists