mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Fix race condition between WMI control RX and driver unload
This is a qcacld-2.0 to qcacld-3.0 propagation Don’t unregister the event in LIM cleanup since it will be take care by WMI service close. Also in tlshim_mgmt_rx_wmi_handler, add driver load/unload check to avoid processing any WMI_MGMT_RX_EVENTID event even the handler is not NULL Change-Id: I72b53b614218f26e874c964a0d8b0affba6cda79 CRs-Fixed: 904490
This commit is contained in:
parent
3f6a72c09e
commit
10ccf878f9
2 changed files with 9 additions and 14 deletions
|
|
@ -644,11 +644,10 @@ tSirRetStatus lim_initialize(tpAniSirGlobal pMac)
|
|||
|
||||
void lim_cleanup(tpAniSirGlobal pMac)
|
||||
{
|
||||
void *p_cds_gctx;
|
||||
CDF_STATUS retStatus;
|
||||
|
||||
/*Before destroying the list making sure all the nodes have been deleted
|
||||
*Which should be the normal case, but a memory leak has been reported
|
||||
/*
|
||||
* Before destroying the list making sure all the nodes have been
|
||||
* deleted Which should be the normal case, but a memory leak has been
|
||||
* reported
|
||||
*/
|
||||
|
||||
struct mgmt_frm_reg_info *pLimMgmtRegistration = NULL;
|
||||
|
|
@ -708,15 +707,6 @@ void lim_cleanup(tpAniSirGlobal pMac)
|
|||
/* Now, finally reset the deferred message queue pointers */
|
||||
lim_reset_deferred_msg_q(pMac);
|
||||
|
||||
p_cds_gctx = cds_get_global_context();
|
||||
retStatus = wma_de_register_mgmt_frm_client(p_cds_gctx);
|
||||
|
||||
if (retStatus != CDF_STATUS_SUCCESS)
|
||||
PELOGE(lim_log
|
||||
(pMac, LOGE,
|
||||
FL
|
||||
("DeRegistering the PE Handle with wma has failed bailing out..."));
|
||||
)
|
||||
#if defined WLAN_FEATURE_VOWIFI
|
||||
rrm_cleanup(pMac);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3049,6 +3049,11 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data,
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (cds_is_load_unload_in_progress()) {
|
||||
WMA_LOGE("Load/Unload in progress");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
cdf_mem_zero(rx_pkt, sizeof(*rx_pkt));
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue