Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thomas Fourier and committed by
Jakub Kicinski
4d984b05 790792eb

+2 -1
+2 -1
drivers/atm/he.c
··· 1587 1587 he_dev->tbrq_base, he_dev->tbrq_phys); 1588 1588 1589 1589 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), 1591 1592 he_dev->tpdrq_base, he_dev->tpdrq_phys); 1592 1593 1593 1594 dma_pool_destroy(he_dev->tpd_pool);