diff options
| author | Sourav Mohapatra <mohapatr@codeaurora.org> | 2017-11-24 15:53:49 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-11-27 05:17:04 -0800 |
| commit | a81808e45e6eea2a4d17af7d9ea6684d36adfefd (patch) | |
| tree | fdf1ed35ce1959038c5bb7aa249dea143db795ea | |
| parent | 2ef3a7874cc37c6e42447978ab404dbb6f7308a6 (diff) | |
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
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d8d51b4a6bc4..679a66d49b72 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12071,6 +12071,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); |
