mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
chelsio/chtls: fix deadlock issue
[ Upstream commit28e9dcd917] 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:cc35c88ae4("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
02bb497cd6
commit
f9dcae22d4
@@ -1348,7 +1348,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);
|
||||
@@ -1357,7 +1356,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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user