From 9db9d235af7e5ca3215f5349a4789eaae3a36636 Mon Sep 17 00:00:00 2001 From: Jingxiang Ge Date: Sat, 14 Oct 2017 17:22:15 +0800 Subject: [PATCH] qcacld-3.0: Ignore netdev notifier when driver status is closed when unloading driver, there is possible that the driver_status has been DRIVER_MODULES_CLOSED, then NETDEV_GOING_DOWN is received, which will cause assert in qdf_mutex_acquire as lock has been destoryed. Change-Id: Ic7e26dc1eb9a40a2462b041b0f3b84452e448cfd CRs-Fixed: 2126832 --- core/hdd/src/wlan_hdd_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a5e817d104fd..99a624c8dbe3 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -510,6 +510,12 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb, QDF_ASSERT(0); return NOTIFY_DONE; } + + if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) { + hdd_err("%s: Driver module is closed", __func__); + return NOTIFY_DONE; + } + if (cds_is_driver_recovering() || cds_is_driver_in_bad_state()) return NOTIFY_DONE;