Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7cdac6d authored by Taehee Yoo's avatar Taehee Yoo Committed by Greg Kroah-Hartman
Browse files

caif-hsi: fix possible deadlock in cfhsi_exit_module()



[ Upstream commit fdd258d49e88a9e0b49ef04a506a796f1c768a8e ]

cfhsi_exit_module() calls unregister_netdev() under rtnl_lock().
but unregister_netdev() internally calls rtnl_lock().
So deadlock would occur.

Fixes: c4125400 ("caif-hsi: Add rtnl support")
Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8fb37be1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
}