mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacmn: Fix memleaks in Rx refill buffer pool
Rx refill lock is not in sync during deinit path causing mem leak of refill buffers. Set the Rx refill lock during deinit path. Change-Id: Ic7d07c0fcaae26f6a269afcba4d593be1d5eacad CRs-Fixed: 2898006
This commit is contained in:
parent
b07b656387
commit
b2d534cc4c
1 changed files with 8 additions and 0 deletions
|
|
@ -373,10 +373,12 @@ static void dp_rx_refill_buff_pool_deinit(struct dp_soc *soc, u8 mac_id)
|
|||
struct rx_refill_buff_pool *buff_pool = &soc->rx_refill_buff_pool;
|
||||
struct rx_desc_pool *rx_desc_pool = &soc->rx_desc_buf[mac_id];
|
||||
qdf_nbuf_t nbuf;
|
||||
uint32_t count = 0;
|
||||
|
||||
if (!buff_pool->is_initialized)
|
||||
return;
|
||||
|
||||
buff_pool->in_rx_refill_lock = true;
|
||||
while ((nbuf = dp_rx_refill_buff_pool_dequeue_nbuf(soc))) {
|
||||
dp_ipa_handle_rx_buf_smmu_mapping(soc, nbuf,
|
||||
rx_desc_pool->buf_size,
|
||||
|
|
@ -385,8 +387,14 @@ static void dp_rx_refill_buff_pool_deinit(struct dp_soc *soc, u8 mac_id)
|
|||
QDF_DMA_BIDIRECTIONAL,
|
||||
rx_desc_pool->buf_size);
|
||||
qdf_nbuf_free(nbuf);
|
||||
count++;
|
||||
}
|
||||
buff_pool->in_rx_refill_lock = false;
|
||||
|
||||
dp_info("Rx refill buffers freed during deinit %u qlen: %u",
|
||||
count, buff_pool->bufq_len);
|
||||
|
||||
qdf_spinlock_destroy(&buff_pool->bufq_lock);
|
||||
buff_pool->is_initialized = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue