From: Pranjal Shrivastava <praan@google.com>
To: weimin xiong <xiongwm2026@163.com>
Cc: Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Joerg Roedel <joro@8bytes.org>,
Benjamin Gaignard <benjamin.gaignard@collabora.com>,
Rob Clark <robin.clark@oss.qualcomm.com>,
linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v1 0/4] iommu: Fix device lookup lifetime and probe cleanup
Date: Tue, 14 Jul 2026 14:06:36 +0000 [thread overview]
Message-ID: <alZCbIIuawpugaQe@google.com> (raw)
In-Reply-To: <20260714060930.220277-1-xiongwm2026@163.com>
On Tue, Jul 14, 2026 at 02:09:26PM +0800, weimin xiong wrote:
> Fix a few IOMMU driver lifetime and error-path issues found while
> auditing fwnode-based device lookup and probe cleanup paths.
>
> The first three patches avoid deriving driver private data after
> dropping the device reference returned by bus_find_device_by_fwnode().
> They also make the ARM SMMU v2 and VSI probe paths fail cleanly when the
> IOMMU lookup fails.
I'm not sure if that's really needed? All these drivers are doing is
dropping the "extra" refcount (incremented by calling find_device) back
to the state *before* the fwnode function call. If you find that this
put_device caused the count to drop to 0, I believe that's the real
problem/bug. These fwnode functions are usually called in probe and the
refcount shouldn't be 0 inside probe.
Could you share your observation / failing logs where this fails? Maybe
something else is wrong with the system?
Thanks,
Praan
next prev parent reply other threads:[~2026-07-14 14:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 6:09 [PATCH v1 0/4] iommu: Fix device lookup lifetime and probe cleanup weimin xiong
2026-07-14 6:09 ` [PATCH v1 1/4] iommu/arm-smmu: Fix fwnode lookup lifetime handling weimin xiong
2026-07-14 6:09 ` [PATCH v1 2/4] iommu/arm-smmu-v3: " weimin xiong
2026-07-14 6:09 ` [PATCH v1 3/4] iommu/vsi: " weimin xiong
2026-07-14 6:09 ` [PATCH v1 4/4] iommu/msm: Clean up probe state on registration failure weimin xiong
2026-07-14 14:06 ` Pranjal Shrivastava [this message]
2026-07-14 15:56 ` [PATCH v1 0/4] iommu: Fix device lookup lifetime and probe cleanup 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=alZCbIIuawpugaQe@google.com \
--to=praan@google.com \
--cc=benjamin.gaignard@collabora.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=xiongwm2026@163.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