mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Prevent access to rx thread after thread shutdown
During unload/SSR, the ol_rx_thread is shutdown and then the cpu hotplug notifier is unregistered. In other context cpu hotplug notifier could be accessing the freed contents of rxthread resulting in use after free. To avoid this race condition, reject the cpu hot plug notificaiton in case of a driver SSR in addition to load/unload. Change-Id: Iafadff92d5660b979c6cf20a70eef42d22a9e51a CRs-Fixed: 2219011
This commit is contained in:
parent
abcce17d32
commit
5fdc34704f
1 changed files with 2 additions and 1 deletions
|
|
@ -351,7 +351,8 @@ static void __cds_cpu_hotplug_notify(uint32_t cpu, bool cpu_up)
|
|||
if (!pSchedContext || !pSchedContext->ol_rx_thread)
|
||||
return;
|
||||
|
||||
if (cds_is_load_or_unload_in_progress())
|
||||
if (cds_is_load_or_unload_in_progress() ||
|
||||
cds_is_module_stop_in_progress() || cds_is_driver_recovering())
|
||||
return;
|
||||
|
||||
cds_debug("'%s' event on CPU %u (of %d); Currently affine to CPU %u",
|
||||
|
|
|
|||
Loading…
Reference in a new issue