mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: Check module status before processing driver command
If the driver module is closed do not process the driver command, it will lead to a crash by accesssing uninitialized lock. To handle this issue check the module status before processing driver command and if module is closed, simply return error. Change-Id: Ic651e1abdf6b2efa27e57695c04ace249f9d21bb CRs-Fixed: 2018746
This commit is contained in:
parent
086986f0c8
commit
ff4e1c4bc4
1 changed files with 10 additions and 0 deletions
|
|
@ -7248,6 +7248,7 @@ static int hdd_driver_command(hdd_adapter_t *adapter,
|
|||
{
|
||||
uint8_t *command = NULL;
|
||||
int ret = 0;
|
||||
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
|
||||
ENTER();
|
||||
|
||||
|
|
@ -7256,6 +7257,15 @@ static int hdd_driver_command(hdd_adapter_t *adapter,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) {
|
||||
hdd_err("Driver module is closed; command can not be processed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note that valid pointers are provided by caller
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue