netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64
@ 2018-06-01 11:25 YueHaibing
  2018-06-14 15:11 ` [v2] " Kalle Valo
  2018-06-14 15:11 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-06-01 11:25 UTC (permalink / raw)
  To: davem, kvalo; +Cc: netdev, linux-kernel, ath10k, linux-wireless, YueHaibing

sizeof(struct ce_desc) should be a copy-paste mistake
just use sizeof(struct ce_desc_64) to avoid mem leak

Fixes: b7ba83f7c414 ("ath10k: add support for shadow register for WNC3990")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/wireless/ath/ath10k/ce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index 3b96a43..35dec2a 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -1512,7 +1512,7 @@ ath10k_ce_alloc_src_ring_64(struct ath10k *ar, unsigned int ce_id,
 		ret = ath10k_ce_alloc_shadow_base(ar, src_ring, nentries);
 		if (ret) {
 			dma_free_coherent(ar->dev,
-					  (nentries * sizeof(struct ce_desc) +
+					  (nentries * sizeof(struct ce_desc_64) +
 					   CE_DESC_RING_ALIGN),
 					  src_ring->base_addr_owner_space_unaligned,
 					  base_addr);
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [v2] ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64
  2018-06-01 11:25 [PATCH v2] ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64 YueHaibing
@ 2018-06-14 15:11 ` Kalle Valo
  2018-06-14 15:11 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-06-14 15:11 UTC (permalink / raw)
  To: YueHaibing
  Cc: linux-wireless, netdev, YueHaibing, linux-kernel, ath10k, davem

YueHaibing <yuehaibing@huawei.com> wrote:

> sizeof(struct ce_desc) should be a copy-paste mistake
> just use sizeof(struct ce_desc_64) to avoid mem leak
> 
> Fixes: b7ba83f7c414 ("ath10k: add support for shadow register for WNC3990")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

5a211627004e ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64

-- 
https://patchwork.kernel.org/patch/10443063/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v2] ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64
  2018-06-01 11:25 [PATCH v2] ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64 YueHaibing
  2018-06-14 15:11 ` [v2] " Kalle Valo
@ 2018-06-14 15:11 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-06-14 15:11 UTC (permalink / raw)
  To: YueHaibing
  Cc: davem, netdev, linux-kernel, ath10k, linux-wireless, YueHaibing

YueHaibing <yuehaibing@huawei.com> wrote:

> sizeof(struct ce_desc) should be a copy-paste mistake
> just use sizeof(struct ce_desc_64) to avoid mem leak
> 
> Fixes: b7ba83f7c414 ("ath10k: add support for shadow register for WNC3990")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

5a211627004e ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64

-- 
https://patchwork.kernel.org/patch/10443063/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-14 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-01 11:25 [PATCH v2] ath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64 YueHaibing
2018-06-14 15:11 ` [v2] " Kalle Valo
2018-06-14 15:11 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).