* [PATCH net] chelsio/chtls: fix deadlock issue
@ 2020-10-25 19:35 Vinay Kumar Yadav
2020-10-27 23:51 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Vinay Kumar Yadav @ 2020-10-25 19:35 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: secdev, Vinay Kumar Yadav
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>
---
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
index d128fc860c6f..24154816d1d1 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
@@ -1512,7 +1512,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);
@@ -1521,7 +1520,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();
}
--
2.18.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] chelsio/chtls: fix deadlock issue
2020-10-25 19:35 [PATCH net] chelsio/chtls: fix deadlock issue Vinay Kumar Yadav
@ 2020-10-27 23:51 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-10-27 23:51 UTC (permalink / raw)
To: Vinay Kumar Yadav; +Cc: netdev, davem, secdev
On Mon, 26 Oct 2020 01:05:39 +0530 Vinay Kumar Yadav wrote:
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-28 1:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-25 19:35 [PATCH net] chelsio/chtls: fix deadlock issue Vinay Kumar Yadav
2020-10-27 23:51 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).