android_kernel_xiaomi_sm8350/core/hdd
Ashish Kumar Dhanotiya e4e6c5b819 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
2018-03-23 04:37:33 -07:00
..
inc qcacld-3.0: Remove legacy IPA code from HDD 2018-03-21 18:57:20 -07:00
src qcacld-3.0: Complete all wait events before shutdown 2018-03-23 04:37:33 -07:00