Selaa lähdekoodia

qcacld-3.0: Check WIFI module status during wifi logger start

During wifi logger start if the modules are in close state,
it will access uninitialized lock.

To handle this, check module status during start of the wifi logger.

Change-Id: I10b3fffa45475c602c22b548d521f75c627b133e
CRs-Fixed: 2012742
Ashish Kumar Dhanotiya 8 vuotta sitten
vanhempi
sitoutus
3c30842fc8
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 4 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -4872,6 +4872,10 @@ static int __wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
 	if (status)
 		return status;
 
+	if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) {
+		hdd_err("Driver Modules are closed, can not start logger");
+		return -EINVAL;
+	}
 
 	if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX,
 				data, data_len,