mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
qcacmn: Fix Dma memory allocation leak from Hif layer
HIF close is not freeing RRI memory allocated during HIF initialization resulting in memory leak of RRI memory after driver unload To mitigate the issue, freeing RRI memory in HIF close. Change-Id: Ib3daba8de0cabc1d8e303d7148448d21c47905e7 CRs-Fixed: 2019147
This commit is contained in:
parent
84613b085a
commit
e14e8e9fcf
3 changed files with 9 additions and 0 deletions
|
|
@ -2971,6 +2971,7 @@ static inline void hif_config_rri_on_ddr(struct hif_softc *scn)
|
|||
scn->qdf_dev->dev, (CE_COUNT*sizeof(uint32_t)),
|
||||
&paddr_rri_on_ddr);
|
||||
|
||||
scn->paddr_rri_on_ddr = paddr_rri_on_ddr;
|
||||
low_paddr = BITS0_TO_31(paddr_rri_on_ddr);
|
||||
high_paddr = BITS32_TO_35(paddr_rri_on_ddr);
|
||||
|
||||
|
|
|
|||
|
|
@ -462,6 +462,13 @@ void hif_close(struct hif_opaque_softc *hif_ctx)
|
|||
qdf_mem_free(hw_name);
|
||||
}
|
||||
|
||||
if (scn->vaddr_rri_on_ddr)
|
||||
qdf_mem_free_consistent(scn->qdf_dev, scn->qdf_dev->dev,
|
||||
(CE_COUNT*sizeof(uint32_t)),
|
||||
scn->vaddr_rri_on_ddr, scn->paddr_rri_on_ddr,
|
||||
0);
|
||||
|
||||
scn->vaddr_rri_on_ddr = NULL;
|
||||
hif_bus_close(scn);
|
||||
qdf_mem_free(scn);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ struct hif_softc {
|
|||
atomic_t active_grp_tasklet_cnt;
|
||||
atomic_t link_suspended;
|
||||
uint32_t *vaddr_rri_on_ddr;
|
||||
qdf_dma_addr_t paddr_rri_on_ddr;
|
||||
int linkstate_vote;
|
||||
bool fastpath_mode_on;
|
||||
atomic_t tasklet_from_intr;
|
||||
|
|
|
|||
Loading…
Reference in a new issue