caif-hsi: fix possible deadlock in cfhsi_exit_module()
authorTaehee Yoo <ap420073@gmail.com>
Mon, 15 Jul 2019 05:10:17 +0000 (14:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:28:44 +0000 (07:28 +0200)
commit08aa823d2d7512f013eb3304140152b84c6d021e
tree9408a96cc395d1019a768ada3d89de902678e8ba
parent9dd7343d3c85fbcf2b70ec3616f55df4b013b6c0
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: c41254006377 ("caif-hsi: Add rtnl support")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/caif/caif_hsi.c