mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
qcacld-3.0: During WiFi turn on get hdd_ctx after driver load
Currently while turning on WiFi, driver is getting hdd_ctx first and then waiting for driver load to complete. This may lead to use after free access if there is a probe fail during the driver load. To avoid this, get hdd_ctx after driver load is complete. Change-Id: I90132a3cf8eb8047d0854f781dbe968bccef94cf CRs-Fixed: 2839442
This commit is contained in:
parent
d05f3b2426
commit
17e749ce8b
1 changed files with 2 additions and 1 deletions
|
|
@ -16011,7 +16011,7 @@ static ssize_t wlan_hdd_state_ctrl_param_write(struct file *filp,
|
|||
static const char wlan_on_str[] = "ON";
|
||||
int ret;
|
||||
unsigned long rc;
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
struct hdd_context *hdd_ctx;
|
||||
|
||||
if (copy_from_user(buf, user_buf, 3)) {
|
||||
pr_err("Failed to read buffer\n");
|
||||
|
|
@ -16046,6 +16046,7 @@ static ssize_t wlan_hdd_state_ctrl_param_write(struct file *filp,
|
|||
* Flush idle shutdown work for cases to synchronize the wifi on
|
||||
* during the idle shutdown.
|
||||
*/
|
||||
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
if (hdd_ctx)
|
||||
hdd_psoc_idle_timer_stop(hdd_ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue