Skip to contentSkip to conversation

atm: Fix dma_free_coherent() size

PATCH Applied Thomas Fourier 2 participants 2 messages Jan 7 – Jan 8

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 atm: Fix dma_free_coherent() size

The size of the buffer is not the same when alloc'd with dma_alloc_coherent() in he_init_tpdrq() and freed.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")

---
v1->v2:
- change Fixes: tag to before the change from pci-consistent to dma-coherent.

 drivers/atm/he.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/atm/he.c +2 -1
index ad91cc6a34fc..92a041d5387b 100644
@@ -1587,7 +1587,8 @@ he_stop(struct he_dev *he_dev)
 				  he_dev->tbrq_base, he_dev->tbrq_phys);
 
 	if (he_dev->tpdrq_base)
-		dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq),
+		dma_free_coherent(&he_dev->pci_dev->dev,
+				  CONFIG_TPDRQ_SIZE * sizeof(struct he_tpdrq),
 				  he_dev->tpdrq_base, he_dev->tpdrq_phys);
 
 	dma_pool_destroy(he_dev->tpd_pool);
Signature · 1 line
2.43.0
#1 lore raw
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 7 Jan 2026 10:01:36 +0100 you wrote:

The size of the buffer is not the same when alloc'd with dma_alloc_coherent() in he_init_tpdrq() and freed.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")

[...]

Here is the summary with links:
- [v2] atm: Fix dma_free_coherent() size

    https://git.kernel.org/netdev/net/c/4d984b0574ff

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html