mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
qcacld-3.0: Complete all wait events before shutdown
There is a race condition between complete wait events as part of fw_down indication and wait for timeout of stop_bss_event during stop_ap. When stop ap and SSR runs parallel, first as part of SSR, fw_down indication comes and all the wait_events are getting set. After this as part of SAP stop, driver is waiting for stop_bss_event which will be never set as fw_down indication is already processed. Timeout of stop_bss_event is much higher than the timeout of wait-for-external- thread-completion during shutdown, hence shutdown will proceed without setting the stop_bss_event. Now as part of the SSR, hdd_re_init gets invoked and the memory of the hdd_hostapd_state (and as part of this memory of stop_bss_event) is getting memset inside hdd_init_ap_mode. After this memset the timeout of the stop_bss_event occurs and stop_bss_event tries to access this memset memory. To address this issue, all the events which were added in between fw_down indication and shutdown process, should be completed as part of the shutdown. Change-Id: I022f125b2afc99862351407b140f2d1b72f43bc4 CRs-Fixed: 2206326
This commit is contained in:
parent
08b89eab90
commit
e4e6c5b819
1 changed files with 12 additions and 0 deletions
|
|
@ -555,6 +555,18 @@ static void wlan_hdd_shutdown(void)
|
|||
hdd_err("Load/unload in progress, ignore SSR shutdown");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Force Complete all the wait events before shutdown.
|
||||
* This is done at "hdd_cleanup_on_fw_down" api also to clean up the
|
||||
* wait events of north bound apis.
|
||||
* In case of SSR there is significant dely between FW down event and
|
||||
* wlan_hdd_shutdown, there is a possibility of race condition that
|
||||
* these wait events gets complete at "hdd_cleanup_on_fw_down" and
|
||||
* some new event is added before shutdown.
|
||||
*/
|
||||
qdf_complete_wait_events();
|
||||
|
||||
/* this is for cases, where shutdown invoked from platform */
|
||||
cds_set_recovery_in_progress(true);
|
||||
hdd_wlan_ssr_shutdown_event();
|
||||
|
|
|
|||
Loading…
Reference in a new issue