]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
atm: Fix dma_free_coherent() size
authorThomas Fourier <fourier.thomas@gmail.com>
Wed, 7 Jan 2026 09:01:36 +0000 (10:01 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Jan 2026 16:47:32 +0000 (08:47 -0800)
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>
drivers/atm/he.c

index ad91cc6a34fc526f061e53692b5650b7af72aa2c..92a041d5387bd84a0515a1aad83070de6fec53e5 100644 (file)
@@ -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);