From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: gregkh@linuxfoundation.org, xen-devel@lists.xenproject.org,
linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com,
stable@vger.kernel.org
Subject: Re: [PATCH v5 2/6] xen/pciback: Don't deadlock when unbinding.
Date: Mon, 4 Aug 2014 14:42:47 -0400 [thread overview]
Message-ID: <20140804184247.GA9009@laptop.dumpdata.com> (raw)
In-Reply-To: <53D64AF3.4080202@citrix.com>
On Mon, Jul 28, 2014 at 02:06:59PM +0100, David Vrabel wrote:
> On 14/07/14 17:18, Konrad Rzeszutek Wilk wrote:
> > As commit 0a9fd0152929db372ff61b0d6c280fdd34ae8bdb
> > 'xen/pciback: Document the entry points for 'pcistub_put_pci_dev''
> > explained there are four entry points in this function.
> > Two of them are when the user fiddles in the SysFS to
> > unbind a device which might be in use by a guest or not.
> >
> > Both 'unbind' states will cause a deadlock as the the PCI lock has
> > already been taken, which then pci_device_reset tries to take.
> >
> > We can simplify this by requiring that all callers of
> > pcistub_put_pci_dev MUST hold the device lock. And then
> > we can just call the lockless version of pci_device_reset.
> >
> > To make it even simpler we will modify xen_pcibk_release_pci_dev
> > to quality whether it should take a lock or not - as it ends
> > up calling xen_pcibk_release_pci_dev and needs to hold the lock.
> >
> > CC: stable@vger.kernel.org
>
> This deadlock is for a rather specific and uncommon use case (manually
> unbinding a PCI while it is passed-through). Is this critical enough to
> warrant a stable backport?
We seem to trip over it frequently when rebooting a server.
That is the VF's end up being unbinded while the guests
are being shutdown. And depending on the timing we end up in a deadlock.
>
> > Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> Reviewed-by: David Vrabel <david.vrabel@citrix.com>
>
> David
next prev parent reply other threads:[~2014-08-04 18:42 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 16:18 [PATCH v5] Fixes to Xen pciback for 3.17 Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 1/6] xen-pciback: Document the various parameters and attributes in SysFS Konrad Rzeszutek Wilk
2014-07-28 13:04 ` David Vrabel
2014-07-28 14:56 ` Greg KH
2014-08-01 14:59 ` David Vrabel
2014-08-01 14:59 ` [Xen-devel] " David Vrabel
2014-07-28 14:56 ` Greg KH
2014-07-28 13:04 ` David Vrabel
2014-07-14 16:18 ` Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 2/6] xen/pciback: Don't deadlock when unbinding Konrad Rzeszutek Wilk
2014-07-28 13:06 ` David Vrabel
2014-08-04 18:42 ` Konrad Rzeszutek Wilk [this message]
2014-08-05 9:27 ` David Vrabel
2014-08-05 9:27 ` [Xen-devel] " David Vrabel
2014-08-04 18:42 ` Konrad Rzeszutek Wilk
2014-07-28 13:06 ` David Vrabel
2014-07-14 16:18 ` Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 3/6] driver core: Provide an wrapper around the mutex to do lockdep warnings Konrad Rzeszutek Wilk
2014-07-14 17:39 ` Greg KH
2014-07-14 17:39 ` Greg KH
2014-07-14 16:18 ` Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 4/6] xen/pciback: Include the domain id if removing the device whilst still in use Konrad Rzeszutek Wilk
2014-07-14 16:18 ` Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 5/6] xen/pciback: Print out the domain owning the device Konrad Rzeszutek Wilk
2014-07-14 16:18 ` Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 6/6] xen/pciback: Remove tons of dereferences Konrad Rzeszutek Wilk
2014-07-14 16:18 ` Konrad Rzeszutek Wilk
2014-07-14 17:40 ` [PATCH v5] Fixes to Xen pciback for 3.17 Greg KH
2014-07-14 17:39 ` Konrad Rzeszutek Wilk
2014-07-14 17:39 ` Konrad Rzeszutek Wilk
2014-07-14 17:40 ` Greg KH
2014-08-01 15:30 ` David Vrabel
2014-08-01 15:30 ` David Vrabel
2014-08-04 18:43 ` Konrad Rzeszutek Wilk
2014-08-05 8:44 ` Sander Eikelenboom
2014-08-05 8:44 ` [Xen-devel] " Sander Eikelenboom
2014-08-05 9:31 ` David Vrabel
2014-08-05 9:44 ` Sander Eikelenboom
2014-08-05 9:44 ` [Xen-devel] " Sander Eikelenboom
2014-08-05 13:49 ` Konrad Rzeszutek Wilk
2014-08-05 13:49 ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-08-05 14:04 ` Sander Eikelenboom
2014-08-05 14:04 ` [Xen-devel] " Sander Eikelenboom
2014-08-06 18:59 ` Sander Eikelenboom
2014-08-06 18:59 ` [Xen-devel] " Sander Eikelenboom
2014-08-06 19:18 ` Konrad Rzeszutek Wilk
2014-08-06 19:18 ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-08-06 19:25 ` Sander Eikelenboom
2014-08-06 19:39 ` Konrad Rzeszutek Wilk
2014-08-06 19:39 ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-08-06 19:47 ` Sander Eikelenboom
2014-08-06 19:47 ` [Xen-devel] " Sander Eikelenboom
2014-08-06 20:09 ` Konrad Rzeszutek Wilk
2014-08-06 20:09 ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-08-06 20:17 ` Sander Eikelenboom
2014-08-06 22:08 ` Sander Eikelenboom
2014-08-06 22:08 ` [Xen-devel] " Sander Eikelenboom
2014-08-06 20:17 ` Sander Eikelenboom
2014-08-07 9:04 ` David Vrabel
2014-08-07 9:04 ` [Xen-devel] " David Vrabel
2014-08-25 17:18 ` Sander Eikelenboom
2014-08-25 17:18 ` [Xen-devel] " Sander Eikelenboom
2014-08-06 19:25 ` Sander Eikelenboom
2014-08-05 14:33 ` [Xen-devel] " Sander Eikelenboom
2014-08-05 14:33 ` Sander Eikelenboom
2014-08-05 9:31 ` David Vrabel
2014-08-04 18:43 ` Konrad Rzeszutek Wilk
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=20140804184247.GA9009@laptop.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xen-devel@lists.xenproject.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.