public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] atm: Fix dma_free_coherent() size
@ 2026-01-05 21:19 Thomas Fourier
  2026-01-05 21:55 ` Creeley, Brett
  2026-01-07  2:03 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Fourier @ 2026-01-05 21:19 UTC (permalink / raw)
  Cc: Thomas Fourier, stable, Chas Williams, chas williams - CONTRACTOR,
	David S. Miller, linux-atm-general, netdev, linux-kernel

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

Fixes: ede58ef28e10 ("atm: remove deprecated use of pci api")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
 drivers/atm/he.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index ad91cc6a34fc..92a041d5387b 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -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);
-- 
2.43.0


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

* Re: [PATCH] atm: Fix dma_free_coherent() size
  2026-01-05 21:19 [PATCH] atm: Fix dma_free_coherent() size Thomas Fourier
@ 2026-01-05 21:55 ` Creeley, Brett
  2026-01-07  2:03 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Creeley, Brett @ 2026-01-05 21:55 UTC (permalink / raw)
  To: Thomas Fourier
  Cc: stable, Chas Williams, chas williams - CONTRACTOR,
	David S. Miller, linux-atm-general, netdev, linux-kernel



On 1/5/2026 1:19 PM, Thomas Fourier wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> The size of the buffer is not the same when alloc'd with
> dma_alloc_coherent() in he_init_tpdrq() and freed.
>
> Fixes: ede58ef28e10 ("atm: remove deprecated use of pci api")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> ---
>   drivers/atm/he.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/atm/he.c b/drivers/atm/he.c
> index ad91cc6a34fc..92a041d5387b 100644
> --- a/drivers/atm/he.c
> +++ b/drivers/atm/he.c
> @@ -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),

Sizes seem to align now. LGTM.

Reviewed-by: Brett Creeley <brett.creeley@amd.com>
>                                    he_dev->tpdrq_base, he_dev->tpdrq_phys);
>
>          dma_pool_destroy(he_dev->tpd_pool);
> --
> 2.43.0
>
>


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

* Re: [PATCH] atm: Fix dma_free_coherent() size
  2026-01-05 21:19 [PATCH] atm: Fix dma_free_coherent() size Thomas Fourier
  2026-01-05 21:55 ` Creeley, Brett
@ 2026-01-07  2:03 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2026-01-07  2:03 UTC (permalink / raw)
  To: Thomas Fourier
  Cc: stable, Chas Williams, chas williams - CONTRACTOR,
	David S. Miller, linux-atm-general, netdev, linux-kernel

On Mon,  5 Jan 2026 22:19:11 +0100 Thomas Fourier wrote:
> The size of the buffer is not the same when alloc'd with
> dma_alloc_coherent() in he_init_tpdrq() and freed.
> 
> Fixes: ede58ef28e10 ("atm: remove deprecated use of pci api")

Fixes tag looks wrong, the size was incorrect before, too.

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

end of thread, other threads:[~2026-01-07  2:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05 21:19 [PATCH] atm: Fix dma_free_coherent() size Thomas Fourier
2026-01-05 21:55 ` Creeley, Brett
2026-01-07  2:03 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox