From: Mikhail Dmitrichenko <mdmitrichenko@astralinux.ru>
To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mikhail Dmitrichenko <mdmitrichenko@astralinux.ru>,
Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>, Koichiro Den <den@valinux.co.jp>,
Leon Romanovsky <leonro@nvidia.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Frank Li <Frank.Li@nxp.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
ntb@lists.linux.dev, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: [PATCH 5.10/5.15 0/3] Backport NTB DMA release fix
Date: Thu, 5 Nov 2026 15:20:30 +0300 [thread overview]
Message-ID: <20261105122035.2021-1-mdmitrichenko@astralinux.ru> (raw)
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(-)
next reply other threads:[~2026-11-05 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 12:20 Mikhail Dmitrichenko [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261105122035.2021-1-mdmitrichenko@astralinux.ru \
--to=mdmitrichenko@astralinux.ru \
--cc=Frank.Li@nxp.com \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=den@valinux.co.jp \
--cc=gregkh@linuxfoundation.org \
--cc=jdmason@kudzu.us \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=m.szyprowski@samsung.com \
--cc=mani@kernel.org \
--cc=ntb@lists.linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®