]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: wwan: iosm: fix recursive lock acquire in unregister
authorM Chetan Kumar <m.chetan.kumar@linux.intel.com>
Wed, 4 Aug 2021 16:09:52 +0000 (21:39 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Aug 2021 10:28:55 +0000 (11:28 +0100)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/iosm/iosm_ipc_wwan.c

index b2357ad5d5171222176e67b3b913a5ee9b648c5c..b571d9cedba49f4d3335be8b36230f6e7eac0947 100644 (file)
@@ -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);