diff options
author | Vinay Kumar Yadav <vinay.yadav@chelsio.com> | 2020-10-26 01:05:39 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-01 12:47:04 +0100 |
commit | 6e3163c742580630cf8bba172ef84c3a5f2a9295 (patch) | |
tree | fa08f1529a3345870a77494cf8442fdd3822e9b2 | |
parent | c4fd583ab0932fead8c02b7f106d0154e148bc71 (diff) | |
download | linux-stable-6e3163c742580630cf8bba172ef84c3a5f2a9295.tar.gz linux-stable-6e3163c742580630cf8bba172ef84c3a5f2a9295.tar.bz2 linux-stable-6e3163c742580630cf8bba172ef84c3a5f2a9295.zip |
chelsio/chtls: fix deadlock issue
[ Upstream commit 28e9dcd9172028263c8225c15c4e329e08475e89 ]
In chtls_pass_establish() we hold child socket lock using bh_lock_sock
and we are again trying bh_lock_sock in add_to_reap_list, causing deadlock.
Remove bh_lock_sock in add_to_reap_list() as lock is already held.
Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Link: https://lore.kernel.org/r/20201025193538.31112-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/crypto/chelsio/chtls/chtls_cm.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/crypto/chelsio/chtls/chtls_cm.c b/drivers/crypto/chelsio/chtls/chtls_cm.c index ec4f79049a06..2fdcac0bcb14 100644 --- a/drivers/crypto/chelsio/chtls/chtls_cm.c +++ b/drivers/crypto/chelsio/chtls/chtls_cm.c @@ -1514,7 +1514,6 @@ static void add_to_reap_list(struct sock *sk) struct chtls_sock *csk = sk->sk_user_data; local_bh_disable(); - bh_lock_sock(sk); release_tcp_port(sk); /* release the port immediately */ spin_lock(&reap_list_lock); @@ -1523,7 +1522,6 @@ static void add_to_reap_list(struct sock *sk) if (!csk->passive_reap_next) schedule_work(&reap_task); spin_unlock(&reap_list_lock); - bh_unlock_sock(sk); local_bh_enable(); } |