Skip to content

Commit 4d984b0

Browse files
Thomas-fourierkuba-moo
authored andcommitted
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") Cc: <stable@vger.kernel.org> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Link: https://patch.msgid.link/20260107090141.80900-2-fourier.thomas@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 790792e commit 4d984b0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/atm/he.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,8 @@ he_stop(struct he_dev *he_dev)
15871587
he_dev->tbrq_base, he_dev->tbrq_phys);
15881588

15891589
if (he_dev->tpdrq_base)
1590-
dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq),
1590+
dma_free_coherent(&he_dev->pci_dev->dev,
1591+
CONFIG_TPDRQ_SIZE * sizeof(struct he_tpdrq),
15911592
he_dev->tpdrq_base, he_dev->tpdrq_phys);
15921593

15931594
dma_pool_destroy(he_dev->tpd_pool);

0 commit comments

Comments
 (0)