summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlok Kumar <alokkuma@codeaurora.org>2018-09-12 13:04:14 +0530
committernshrivas <nshrivas@codeaurora.org>2018-09-18 05:27:10 -0700
commit9bf84a92ec70588e1dbb4ecfd8f881568f49fa3f (patch)
tree85db1c4f5653734d141c7e55f8725255689e192b
parent1e0efd444b05e5203f91d43f7a5e319bf2040387 (diff)
qcacld-3.0: Fix qdf_mem_header validation failure issue
During htt_rx_attach, when we allocate pdev->rx_ring.buf.paddrs_ring we use size as sizeof(target_paddr_t) and when we try to free this buffer in htt_rx_detach, we pass size as sizeof(qdf_dma_addr_t). For 32-bit host architecture where dma_addr_t is 32 bits and bus addresses are of 64 bits, we get qdf_mem_header validation fail. During htt_rx_detach, use sizeof(target_paddr_t) to free the buffer. Change-Id: If5972010e7fb1f87b0782fd5932572b84330186a CRs-Fixed: 2312784
-rw-r--r--core/dp/htt/htt_rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c
index 94b3e01e8e0b..afcb4107f8c3 100644
--- a/core/dp/htt/htt_rx.c
+++ b/core/dp/htt/htt_rx.c
@@ -798,7 +798,7 @@ void htt_rx_detach(struct htt_pdev_t *pdev)
memctx));
qdf_mem_free_consistent(pdev->osdev, pdev->osdev->dev,
- pdev->rx_ring.size * sizeof(qdf_dma_addr_t),
+ pdev->rx_ring.size * sizeof(target_paddr_t),
pdev->rx_ring.buf.paddrs_ring,
pdev->rx_ring.base_paddr,
qdf_get_dma_mem_context((&pdev->rx_ring.buf),