From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <Ian.Campbell@eu.citrix.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>,
xen-devel <xen-devel@lists.xensource.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH 1/6] xen-gntdev: Fix circular locking dependency
Date: Wed, 15 Dec 2010 16:28:31 -0800 [thread overview]
Message-ID: <4D095D2F.8070002@goop.org> (raw)
In-Reply-To: <1292406442.32368.2613.camel@zakaz.uk.xensource.com>
On 12/15/2010 01:47 AM, Ian Campbell wrote:
> On Tue, 2010-12-14 at 21:40 +0000, Daniel De Graaf wrote:
>> On 12/14/2010 04:11 PM, Jeremy Fitzhardinge wrote:
>>> On 12/14/2010 06:55 AM, Daniel De Graaf wrote:
>>>> apply_to_page_range will acquire PTE lock while priv->lock is held, and
>>>> mn_invl_range_start tries to acquire priv->lock with PTE already held.
>>>> Fix by not holding priv->lock during the entire map operation.
>>> Is priv->lock needed to protect the contents of map?
>>>
>>> J
>> No, since the map can only be mapped once (checked by map->vma assignment
>> while the lock is held). The unmap ioctl will return -EBUSY until
>> an munmap() is called on the area, so it also can't race, and the other
>> users are only active once the mmap operation completes.
> Sounds reasonable enough to me. There are a few unlocked accesses to
> vma->map:
> gntdev_del_map (when called from gntdev_ioctl_map_grant_ref)
> gntdev_vma_close
> are these safe? If so then it would be worth a comment about why.
>
> Anyway this patch appears to resolve the lockdep warning I was seeing
> with 2.6.37 with qemu-xen backed block devices.
Good. Stefano should stick this on his patch queue.
J
next prev parent reply other threads:[~2010-12-16 0:28 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-14 14:55 [PATCH v2] Userspace grant communication Daniel De Graaf
2010-12-14 14:55 ` [PATCH 1/6] xen-gntdev: Fix circular locking dependency Daniel De Graaf
2010-12-14 21:11 ` Jeremy Fitzhardinge
2010-12-14 21:40 ` Daniel De Graaf
2010-12-15 9:47 ` Ian Campbell
2010-12-16 0:28 ` Jeremy Fitzhardinge [this message]
2010-12-16 15:09 ` Stefano Stabellini
2010-12-14 14:55 ` [PATCH 2/6] xen-gntdev: Change page limit to be global instead of per-open Daniel De Graaf
2010-12-14 21:12 ` Jeremy Fitzhardinge
2010-12-14 21:42 ` Daniel De Graaf
2010-12-15 9:50 ` Ian Campbell
2010-12-16 0:27 ` Jeremy Fitzhardinge
2010-12-14 14:55 ` [PATCH 3/6] xen-gntdev: Remove unneeded structures from grant_map tracking data Daniel De Graaf
2010-12-14 21:15 ` Jeremy Fitzhardinge
2010-12-14 21:52 ` Daniel De Graaf
2010-12-14 21:56 ` Jeremy Fitzhardinge
2010-12-14 21:54 ` Jeremy Fitzhardinge
2010-12-14 14:55 ` [PATCH 4/6] xen-gntdev: Use find_vma rather than iterating our vma list manually Daniel De Graaf
2010-12-14 21:20 ` Jeremy Fitzhardinge
2010-12-15 9:58 ` Ian Campbell
2010-12-16 0:29 ` Jeremy Fitzhardinge
2010-12-14 14:55 ` [PATCH 5/6] xen-gntalloc: Userspace grant allocation driver Daniel De Graaf
2010-12-14 21:42 ` Jeremy Fitzhardinge
2010-12-14 22:06 ` Daniel De Graaf
2010-12-14 22:40 ` Jeremy Fitzhardinge
2010-12-15 14:18 ` Daniel De Graaf
2010-12-16 1:05 ` Jeremy Fitzhardinge
2010-12-16 15:22 ` Daniel De Graaf
2010-12-16 19:14 ` Jeremy Fitzhardinge
2010-12-14 14:55 ` [PATCH 6/6] xen-gntdev: Introduce HVM version of gntdev Daniel De Graaf
2010-12-14 21:45 ` Jeremy Fitzhardinge
2010-12-14 22:27 ` Daniel De Graaf
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=4D095D2F.8070002@goop.org \
--to=jeremy@goop.org \
--cc=Ian.Campbell@eu.citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.