caif-hsi: fix possible deadlock in cfhsi_exit_module()
Subsystems (2)
PATCH 1/1 caif-hsi: fix possible deadlock in cfhsi_exit_module()
cfhsi_exit_module() calls unregister_netdev() under rtnl_lock(). but unregister_netdev() internally calls rtnl_lock(). So deadlock would occur.
Fixes c41254006377 ("caif-hsi: Add rtnl support")
Signed-off-by Taehee Yoo <[email protected]>
---
I did only compile test because I don't have the testbed. Could anyone test this patch?
drivers/net/caif/caif_hsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/caif/caif_hsi.c +1 -1
@@ -1455,7 +1455,7 @@ static void __exit cfhsi_exit_module(void)rtnl_lock ();list_for_each_safe (list_node, n, &cfhsi_list) { cfhsi = list_entry(list_node, struct cfhsi, list); -unregister_netdev (cfhsi->ndev); +unregister_netdevice (cfhsi->ndev); }rtnl_unlock (); }
Signature · 1 line
2.17.1
David Miller
maintainerFrom: Taehee Yoo <[email protected]>
Date: Mon, 15 Jul 2019 14:10:17 +0900
Quoted 6 lines
cfhsi_exit_module()callsunregister_netdev()underrtnl_lock(). butunregister_netdev()internally callsrtnl_lock(). So deadlock would occur.Fixes c41254006377 ("caif-hsi: Add rtnl support")Signed-off-by Taehee Yoo <[email protected]>
Applied and queued up for -stable, thank you.