From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Gregor Dick <gdick-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Kieran Mansley <kmansley-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
Subject: Re: PROBLEM: Deadlock in attach_device() in AMD IOMMU driver
Date: Tue, 5 May 2015 16:41:59 +0200 [thread overview]
Message-ID: <20150505144159.GI15736@8bytes.org> (raw)
In-Reply-To: <55488C3D.50509-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
Hi Gregor,
On Tue, May 05, 2015 at 10:24:13AM +0100, Gregor Dick wrote:
> The problem occurs when a network driver (sfc.ko, here an internal
> testing version) enables SR-IOV on its device by calling
> pci_enable_sriov(). There are two PFs for this physical device. This
> call in turn results in a call to virtfn_add(), which takes the
> pci_sriov lock for the first function on the bus. The AMD IOMMU driver
> then handles the device-change notification by calling attach_device()
> which in turn calls pci_enable_ats(). This latter function also
> attempts to take the pci_sriov lock (although this time for
> dev->physfn rather than dev->sriov->dev, but these need not be
> distinct).
Do you see a real deadlock or only the lockdep warning? In the code it
looks like virtfn_add() takes the sriov->lock of the physical device
while pci_enable_ats() (when called from there) takes the sriov->lock of
the virtual function. In this case it couldn't deadlock.
Joerg
next prev parent reply other threads:[~2015-05-05 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 9:24 PROBLEM: Deadlock in attach_device() in AMD IOMMU driver Gregor Dick
[not found] ` <55488C3D.50509-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
2015-05-05 14:41 ` Joerg Roedel [this message]
[not found] ` <20150505144159.GI15736-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2015-05-05 14:47 ` Gregor Dick
[not found] ` <5548D814.6020807-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
2015-05-05 15:33 ` Joerg Roedel
[not found] ` <20150505153344.GR15736-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2015-05-06 11:44 ` Gregor Dick
[not found] ` <5549FEA1.9080801-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
2015-05-11 10:15 ` Joerg Roedel
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=20150505144159.GI15736@8bytes.org \
--to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
--cc=gdick-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=kmansley-s/n/eUQHGBpZroRs9YW3xA@public.gmane.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.