qcacld-3.0: Dont set mc addr list if the modules are closed
MC addr list is a ndo operation can be invoked by the kernel even
if the driver modules are closed which can result in accessing from
freed variables.
Reject the set/reset mc addr list when the modules are closed.
Change-Id: Ief83e18e6f8e431c7d68377f803ac602178f8913
CRs-Fixed: 2153099
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index fe90357..b2fd050 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -3011,6 +3011,11 @@
if (status)
goto out;
+ if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) {
+ hdd_err("%s: Driver module is closed", __func__);
+ return;
+ }
+
mc_list_request = qdf_mem_malloc(sizeof(*mc_list_request));
if (!mc_list_request) {
hdd_err("Cannot allocate mc_list_request");