From: Joerg Roedel <joro@8bytes.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: will@kernel.org, iommu@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, yong.wu@mediatek.com,
thierry.reding@gmail.com, vdumpa@nvidia.com
Subject: Re: [PATCH] iommu: Unexport iommu_fwspec_free()
Date: Mon, 10 Mar 2025 09:26:39 +0100 [thread overview]
Message-ID: <Z86iP6_qe5HwndM7@8bytes.org> (raw)
In-Reply-To: <36e245489361de2d13db22a510fa5c79e7126278.1740667667.git.robin.murphy@arm.com>
On Thu, Feb 27, 2025 at 02:47:47PM +0000, Robin Murphy wrote:
> The drivers doing their own fwspec parsing have no need to call
> iommu_fwspec_free() since fwspecs were moved into dev_iommu, as
> returning an error from .probe_device will tear down the whole lot
> anyway. Move it into the private interface now that it only serves
> for of_iommu to clean up in an error case.
>
> I have no idea what mtk_v1 was doing in effectively guaranteeing
> a NULL fwspec would be dereferenced if no "iommus" DT property was
> found, so add a check for that to at least make the code look sane.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
> drivers/iommu/arm/arm-smmu/arm-smmu.c | 1 -
> drivers/iommu/iommu-priv.h | 2 ++
> drivers/iommu/iommu.c | 1 -
> drivers/iommu/mtk_iommu_v1.c | 14 ++++----------
> drivers/iommu/tegra-smmu.c | 1 -
> include/linux/iommu.h | 5 -----
> 6 files changed, 6 insertions(+), 18 deletions(-)
Applied, thanks.
next prev parent reply other threads:[~2025-03-10 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 14:47 [PATCH] iommu: Unexport iommu_fwspec_free() Robin Murphy
2025-03-05 18:29 ` Jason Gunthorpe
2025-03-10 8:26 ` Joerg Roedel [this message]
2025-03-11 13:15 ` Joerg Roedel
2025-03-11 14:21 ` Robin Murphy
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=Z86iP6_qe5HwndM7@8bytes.org \
--to=joro@8bytes.org \
--cc=iommu@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robin.murphy@arm.com \
--cc=thierry.reding@gmail.com \
--cc=vdumpa@nvidia.com \
--cc=will@kernel.org \
--cc=yong.wu@mediatek.com \
/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;
as well as URLs for NNTP newsgroup(s).