From: Jason Gunthorpe <jgg@nvidia.com>
To: Joerg Roedel <jroedel@suse.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
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>,
Chen-Yu Tsai <wenst@chromium.org>
Subject: Re: [PATCH v2 0/4] Fix device_lock deadlock on two probe() paths
Date: Fri, 18 Aug 2023 13:06:43 -0300 [thread overview]
Message-ID: <ZN+XE7dk04f2C3D7@nvidia.com> (raw)
In-Reply-To: <ZN-UpDFHab0vGuXp@suse.de>
On Fri, Aug 18, 2023 at 05:56:20PM +0200, Joerg Roedel wrote:
> On Thu, Aug 17, 2023 at 03:33:16PM -0300, Jason Gunthorpe wrote:
> > Bascially.. Yikes!
>
> Hmm, that is a difficult situation. Even if the problem is a misuse of
> the APIs we can not just blindly break other drivers by our core
> changes.
They are not broken, they just throw a lockdep warning and keep going
as before. This is what triggers:
static inline void device_lock_assert(struct device *dev)
{
lockdep_assert_held(&dev->mutex);
}
So non-debug builds won't even see anything.
> We need to resolve this situation pretty soon, otherwise I need to
> remove the locking rework patches from the IOMMU tree until the
> callers are fixed.
>
> Is there a way to keep the broken drivers working for now?
Historically we've tolerated lockdep warnings as a way to motivate
people who care to fix their stuff properly. eg the Intel VT-D had a
lockdep warning at kernel boot for many releases before it was fixed.
The series doesn't make things any functionally worse for these places
misusing the API, but it now does throw a warning in some cases.
IMHO I'd rather keep the warning rather than supress it by adding
device_locks(). Do you agree?
Jason
next prev parent reply other threads:[~2023-08-18 16:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230809144403eucas1p1345aec6ec34440f1794594426e0402ab@eucas1p1.samsung.com>
2023-08-09 14:43 ` [PATCH v2 0/4] Fix device_lock deadlock on two probe() paths Jason Gunthorpe
2023-08-09 14:43 ` [PATCH v2 1/4] iommu: Provide iommu_probe_device_locked() Jason Gunthorpe
2023-08-09 14:43 ` [PATCH v2 2/4] iommu: Pass in the iommu_device to probe for in bus_iommu_probe() Jason Gunthorpe
2023-08-09 14:43 ` [PATCH v2 3/4] iommu: Do not attempt to re-lock the iommu device when probing Jason Gunthorpe
2023-08-10 2:37 ` Tian, Kevin
2023-08-09 14:43 ` [PATCH v2 4/4] iommu: dev->iommu->iommu_dev must be set before ops->device_group() Jason Gunthorpe
2023-08-10 2:37 ` Tian, Kevin
2023-08-09 15:49 ` [PATCH v2 0/4] Fix device_lock deadlock on two probe() paths Joerg Roedel
2023-08-09 15:55 ` Jason Gunthorpe
2023-08-10 16:15 ` Jeffrey Hugo
2023-08-17 8:31 ` Marek Szyprowski
2023-08-17 18:33 ` Jason Gunthorpe
2023-08-18 15:56 ` Joerg Roedel
2023-08-18 16:06 ` Jason Gunthorpe [this message]
2023-08-18 18:00 ` Eric Farman
2023-08-18 18:15 ` Jason Gunthorpe
2023-08-18 18:32 ` Eric Farman
2023-08-18 18:24 ` Joerg Roedel
2023-08-18 18:50 ` Robin Murphy
2023-08-18 19:19 ` Jason Gunthorpe
2023-08-21 11:35 ` Robin Murphy
2023-08-18 19:18 ` Jason Gunthorpe
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=ZN+XE7dk04f2C3D7@nvidia.com \
--to=jgg@nvidia.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--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 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).