diff mbox series

[4/4] net: wwan: iosm: fix recursive lock acquire in unregister

Message ID 20210804160952.70254-5-m.chetan.kumar@linux.intel.com
State New
Headers show
Series net: wwan: iosm: fixes | expand

Commit Message

Kumar, M Chetan Aug. 4, 2021, 4:09 p.m. UTC
Calling unregister_netdevice() inside wwan del link is trying to
acquire the held lock in ndo_stop_cb(). Instead, queue net dev to
be unregistered later.

Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
---
 drivers/net/wwan/iosm/iosm_ipc_wwan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Loic Poulain Aug. 4, 2021, 5:09 p.m. UTC | #1
On Wed, 4 Aug 2021 at 18:11, M Chetan Kumar
<m.chetan.kumar@linux.intel.com> wrote:
>
> Calling unregister_netdevice() inside wwan del link is trying to
> acquire the held lock in ndo_stop_cb(). Instead, queue net dev to
> be unregistered later.
>
> Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com>

Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
diff mbox series

Patch

diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
index b2357ad5d517..b571d9cedba4 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
@@ -228,7 +228,7 @@  static void ipc_wwan_dellink(void *ctxt, struct net_device *dev,
 
 	RCU_INIT_POINTER(ipc_wwan->sub_netlist[if_id], NULL);
 	/* unregistering includes synchronize_net() */
-	unregister_netdevice(dev);
+	unregister_netdevice_queue(dev, head);
 
 unlock:
 	mutex_unlock(&ipc_wwan->if_mutex);