From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
boris.ostrovsky@oracle.com, david.vrabel@citrix.com
Subject: Re: [PATCH v5] Fixes to Xen pciback for 3.17.
Date: Mon, 14 Jul 2014 13:39:19 -0400 [thread overview]
Message-ID: <20140714173919.GC12920@laptop.dumpdata.com> (raw)
In-Reply-To: <20140714174042.GB6166@kroah.com>
On Mon, Jul 14, 2014 at 10:40:42AM -0700, Greg KH wrote:
> On Mon, Jul 14, 2014 at 12:18:50PM -0400, Konrad Rzeszutek Wilk wrote:
> > Greg: goto GHK
> >
> > This is v5 version of patches to fix some issues in Xen PCIback.
> >
> > One of the issues Xen PCI back has that patch:
> >
> > is fixing is that a deadlock can happen if the PCI device is
> > assigned to a guest and we try to 'unbind' it from Xen 'pciback' driver.
> > The issue is rather simple - the SysFS mechanism for the 'unbind' path
> > takes a device lock and the code in Xen PCI uses the pci_reset_function
> > which also takes the same lock. Solution is to use the lock-less version
> > and mandate that callers of said function in Xen pciback take the lock.
> > Easy enough.
> >
> > GHK:
> > To guard against this happening in the future we also add an assert in the
> > form of lockdep assertion. That is OK except that it looks ugly as we take
> > it straight from the 'struct device' instead of using an appropriate macro.
> > See:
> >
> > + lockdep_assert_held(&dev->dev.mutex);
> >
> > (in [PATCH v5 2/6] xen/pciback: Don't deadlock when unbinding).
> >
> > The patch: [PATCH v5 3/6] driver core: Provide an wrapper around the mutex
> > to do.
> >
> > introduces a nice wrapper so it is bit cleaner. Greg, if you are OK with
> > it could you kindly Ack it as I would prefer to put this patchset
> > via the Xen tree. It would look now as:
> >
> > - lockdep_assert_held(&dev->dev.mutex);
> > + device_lock_assert(&dev->dev);
> >
> > I can also squash it in "[PATCH v5 2/6] xen/pciback: Don't deadlock when
> > unbinding." but since that one is going through the stable tree I wasn't
> > sure whether you (Greg KH) would be OK with that.
>
> You have my ack now, and feel free to squash it into patch 2/6 if you
> want, I don't mind having that in the stable trees.
Fantastic! Thank you.
>
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2014-07-14 17:39 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 16:18 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
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 [this message]
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=20140714173919.GC12920@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=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