From 3c30842fc8533769ee6dc1bbc60041f228d4f045 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Thu, 2 Mar 2017 16:48:56 +0530 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_cfg80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index b0358c628bc2..5e0f4661d5af 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/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,