Преглед изворни кода

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
Jingxiang Ge пре 7 година
родитељ
комит
9db9d235af
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      core/hdd/src/wlan_hdd_main.c

+ 6 - 0
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;