[PATCH 5.10/5.15 0/3] Backport NTB DMA release fix
From: Mikhail Dmitrichenko
Date: Thu Nov 05 2026 - 07:32:46 EST
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(-)