[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201027135456.233512294@linuxfoundation.org>
Date: Tue, 27 Oct 2020 14:49:23 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Vinay Kumar Yadav <vinay.yadav@...lsio.com>,
Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH 5.4 025/408] chelsio/chtls: fix socket lock
From: Vinay Kumar Yadav <vinay.yadav@...lsio.com>
[ Upstream commit 0fb5f0160a36d7acaa8e84ce873af99f94b60484 ]
In chtls_sendpage() socket lock is released but not acquired,
fix it by taking lock.
Fixes: 36bedb3f2e5b ("crypto: chtls - Inline TLS record Tx")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@...lsio.com>
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/crypto/chelsio/chtls/chtls_io.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/crypto/chelsio/chtls/chtls_io.c
+++ b/drivers/crypto/chelsio/chtls/chtls_io.c
@@ -1210,6 +1210,7 @@ int chtls_sendpage(struct sock *sk, stru
copied = 0;
csk = rcu_dereference_sk_user_data(sk);
cdev = csk->cdev;
+ lock_sock(sk);
timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
err = sk_stream_wait_connect(sk, &timeo);
Powered by blists - more mailing lists