From: Jason Gunthorpe <jgg@nvidia.com>
To: Mark Brown <broonie@kernel.org>
Cc: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Will Deacon <will@kernel.org>,
Lu Baolu <baolu.lu@linux.intel.com>,
Kevin Tian <kevin.tian@intel.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Chen-Yu Tsai <wenst@chromium.org>,
Aishwarya.TCV@arm.com
Subject: Re: [PATCH 0/3] Fix device_lock deadlock on two probe() paths
Date: Tue, 8 Aug 2023 19:26:15 -0300 [thread overview]
Message-ID: <ZNLBB64lnWZhJ4vI@nvidia.com> (raw)
In-Reply-To: <0bf0557d-1dd9-45e7-a4a3-8b2527eeff7e@sirena.org.uk>
On Tue, Aug 08, 2023 at 09:18:51PM +0100, Mark Brown wrote:
> On Tue, Aug 08, 2023 at 02:27:04PM -0300, Jason Gunthorpe wrote:
> > I missed two paths where __iommu_probe_device() can be called while
> > already holding the device_lock() for the device that is to be probed.
> >
> > This causes a deadlock because __iommu_probe_device() will attempt to
> > re-acquire the lock.
> >
> > Organize things so that these two paths can re-use the existing already
> > held device_lock by marking the call chains based on if the lock is held
> > or not.
> >
> > This is an incremental on top of Joerg's next, but it could also be handled by
> > respinning the last patch in that series. Please let me know.
>
> The issues this series fixes have been causing quite a bit of breakage
> in a range of CI systems (Arm's internal stuff, KernelCI and my personal
> CI). Both the KernelCI bot and my colleague Aishwarya (CCed) bisected
> which pointed to this series so I've tested them - I didn't cover every
> board but this does fix at least some boots so:
>
> Tested-by: Mark Brown <broonie@kernel.org>
>
> It'd be great to get these fixes into -next, thanks for getting the
> patches out so quickly.
Yes, sorry about that, this series didn't get picked up by any arm testing
before getting merged..
Thanks,
Jason
next prev parent reply other threads:[~2023-08-08 22:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 17:27 [PATCH 0/3] Fix device_lock deadlock on two probe() paths Jason Gunthorpe
2023-08-08 17:27 ` [PATCH 1/3] iommu: Provide iommu_probe_device_locked() Jason Gunthorpe
2023-08-09 3:55 ` Tian, Kevin
2023-08-09 9:14 ` Joerg Roedel
2023-08-08 17:27 ` [PATCH 2/3] iommu: Pass in the iommu_device to probe for in bus_iommu_probe() Jason Gunthorpe
2023-08-09 3:57 ` Tian, Kevin
2023-08-08 17:27 ` [PATCH 3/3] iommu: Do not attempt to re-lock the iommu device when probing Jason Gunthorpe
2023-08-09 4:01 ` Tian, Kevin
2023-08-09 12:15 ` Jason Gunthorpe
2023-08-09 13:38 ` Marek Szyprowski
2023-08-09 14:33 ` Jason Gunthorpe
2023-08-08 20:18 ` [PATCH 0/3] Fix device_lock deadlock on two probe() paths Mark Brown
2023-08-08 22:26 ` Jason Gunthorpe [this message]
2023-08-09 6:37 ` Chen-Yu Tsai
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=ZNLBB64lnWZhJ4vI@nvidia.com \
--to=jgg@nvidia.com \
--cc=Aishwarya.TCV@arm.com \
--cc=baolu.lu@linux.intel.com \
--cc=broonie@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=rafael@kernel.org \
--cc=robin.murphy@arm.com \
--cc=wenst@chromium.org \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.