mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Wait for external threads to complete before con mode switch
Interface up runs in normal mode (wifi@1.0-service) and it gets preempted by the con_mode change handler when Monitor mode is invoked via user. Then again when the normal mode gets scheduled after the completion of Monitor mode, it tries to access contents freed during the con_mode change. The __con_mode_handler is made to wait for the external threads to complete before making the con mode switch Change-Id: I245b6b6f855e119a11422677da161a43c1184069 CRs-fixed: 2147499
This commit is contained in:
parent
6d5446249e
commit
3bc5e981b1
1 changed files with 3 additions and 0 deletions
|
|
@ -11836,6 +11836,9 @@ static int __con_mode_handler(const char *kmessage, struct kernel_param *kp,
|
|||
goto reset_flags;
|
||||
}
|
||||
|
||||
if (!cds_wait_for_external_threads_completion(__func__))
|
||||
hdd_warn("Waiting for monitor mode: External threads are active");
|
||||
|
||||
/* ensure adapters are stopped */
|
||||
hdd_stop_present_mode(hdd_ctx, curr_mode);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue