xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xen.org
Cc: keir@xen.org, andres@gridcentric.ca, tim@xen.org, JBeulich@suse.com
Subject: [PATCH] Extra check in grant table code for mapping of shared frame
Date: Thu, 13 Sep 2012 11:27:48 -0400	[thread overview]
Message-ID: <40b91bed1275b13e191f.1347550068@xdev.gridcentric.ca> (raw)

 xen/common/grant_table.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>

diff -r 5ce5b53ea68f -r 40b91bed1275 xen/common/grant_table.c
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -649,9 +649,12 @@ __gnttab_map_grant_ref(
     }
     else if ( owner == rd || owner == dom_cow )
     {
-        if ( gnttab_host_mapping_get_page_type(op, ld, rd) &&
-             !get_page_type(pg, PGT_writable_page) )
-            goto could_not_pin;
+        if ( gnttab_host_mapping_get_page_type(op, ld, rd) )
+        {
+            if ( (owner == dom_cow) ||
+                 !get_page_type(pg, PGT_writable_page) )
+                goto could_not_pin;
+        }
 
         nr_gets++;
         if ( op->flags & GNTMAP_host_map )

             reply	other threads:[~2012-09-13 15:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 15:27 Andres Lagar-Cavilla [this message]
2012-09-17 11:00 ` [PATCH] Extra check in grant table code for mapping of shared frame Andres Lagar-Cavilla
2012-09-17 11:17   ` Keir Fraser
2012-09-17 16:29     ` Tim Deegan
2012-09-19 15:35 ` Jan Beulich
2012-09-20 15:30   ` Andres Lagar-Cavilla
2012-09-20 15:50     ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2012-09-04 15:11 Andres Lagar-Cavilla

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=40b91bed1275b13e191f.1347550068@xdev.gridcentric.ca \
    --to=andres@lagarcavilla.org \
    --cc=JBeulich@suse.com \
    --cc=andres@gridcentric.ca \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).