mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 5.10/5.15 0/3] Backport NTB DMA release fix
@ 2026-11-05 12:20 Mikhail Dmitrichenko
  2026-11-05 12:20 ` [PATCH 5.10/5.15 1/3] NTB: core: Add .get_dma_dev() callback to ntb_dev_ops Mikhail Dmitrichenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mikhail Dmitrichenko @ 2026-11-05 12:20 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Mikhail Dmitrichenko, Jon Mason, Dave Jiang, Allen Hubbe,
	Koichiro Den, Leon Romanovsky, Marek Szyprowski, Frank Li,
	Manivannan Sadhasivam, Bjorn Helgaas, ntb, linux-kernel,
	lvc-project

When the NTB receive buffer needs manual alignment, ntb_transport
keeps the aligned DMA address and later passes it to dma_free_coherent()
along with the original CPU address. Preserve the original DMA handle
and use it when releasing the allocation.

The fix is needed in 5.10.y and 5.15.y. Include two prerequisites so the
upstream fix applies without changes. Existing hardware drivers do not
implement get_dma_dev, so the new helper returns ntb->dev.parent, which
ntb_register_device() sets to &ntb->pdev->dev in both branches.

The same prerequisite series and fix are present in 6.1.y and newer
stable branches.

All three commits apply cleanly to v5.10.273 and v5.15.224.
Build-tested only.

Fix for CVE-2026-80884.

Koichiro Den (2):
  NTB: core: Add .get_dma_dev() callback to ntb_dev_ops
  NTB: ntb_transport: Use ntb_get_dma_dev() for DMA buffers

Leon Romanovsky (1):
  ntb: Store original DMA address for future release

 drivers/ntb/ntb_transport.c | 18 ++++++++++--------
 include/linux/ntb.h         | 24 ++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 8 deletions(-)

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

end of thread, other threads:[~2026-11-05 12:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 12:20 [PATCH 5.10/5.15 0/3] Backport NTB DMA release fix Mikhail Dmitrichenko
2026-11-05 12:20 ` [PATCH 5.10/5.15 1/3] NTB: core: Add .get_dma_dev() callback to ntb_dev_ops Mikhail Dmitrichenko
2026-11-05 12:20 ` [PATCH 5.10/5.15 2/3] NTB: ntb_transport: Use ntb_get_dma_dev() for DMA buffers Mikhail Dmitrichenko
2026-11-05 12:20 ` [PATCH 5.10/5.15 3/3] ntb: Store original DMA address for future release Mikhail Dmitrichenko

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

all inboxes | Powered by JetHome®