mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	<gregkh@linuxfoundation.org>, <xen-devel@lists.xenproject.org>,
	<linux-kernel@vger.kernel.org>, <boris.ostrovsky@oracle.com>
Cc: <stable@vger.kernel.org>
Subject: Re: [PATCH v5 2/6] xen/pciback: Don't deadlock when unbinding.
Date: Mon, 28 Jul 2014 14:06:59 +0100	[thread overview]
Message-ID: <53D64AF3.4080202@citrix.com> (raw)
In-Reply-To: <1405354736-7358-3-git-send-email-konrad.wilk@oracle.com>

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?

> 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

  reply	other threads:[~2014-07-28 13:07 UTC|newest]

Thread overview: 34+ 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       ` [Xen-devel] " David Vrabel
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 [this message]
2014-08-04 18:42     ` Konrad Rzeszutek Wilk
2014-08-05  9:27       ` [Xen-devel] " David Vrabel
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 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 ` [PATCH v5 5/6] xen/pciback: Print out the domain owning the device Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 6/6] xen/pciback: Remove tons of dereferences 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-08-01 15:30 ` David Vrabel
2014-08-04 18:43   ` Konrad Rzeszutek Wilk
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 13:49           ` Konrad Rzeszutek Wilk
2014-08-05 14:04             ` Sander Eikelenboom
2014-08-06 18:59               ` Sander Eikelenboom
2014-08-06 19:18                 ` Konrad Rzeszutek Wilk
2014-08-06 19:25                   ` Sander Eikelenboom
2014-08-06 19:39                     ` Konrad Rzeszutek Wilk
2014-08-06 19:47                       ` Sander Eikelenboom
2014-08-06 20:09                         ` Konrad Rzeszutek Wilk
2014-08-06 20:17                           ` Sander Eikelenboom
2014-08-06 22:08                             ` Sander Eikelenboom
2014-08-07  9:04                       ` David Vrabel
2014-08-25 17:18                         ` Sander Eikelenboom
2014-08-05 14:33             ` Sander Eikelenboom

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=53D64AF3.4080202@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.wilk@oracle.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome