xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Extra check in grant table code for mapping of shared frame
@ 2012-09-13 15:27 Andres Lagar-Cavilla
  2012-09-17 11:00 ` Andres Lagar-Cavilla
  2012-09-19 15:35 ` Jan Beulich
  0 siblings, 2 replies; 8+ messages in thread
From: Andres Lagar-Cavilla @ 2012-09-13 15:27 UTC (permalink / raw)
  To: xen-devel; +Cc: keir, andres, tim, JBeulich

 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 )

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] Extra check in grant table code for mapping of shared frame
@ 2012-09-04 15:11 Andres Lagar-Cavilla
  0 siblings, 0 replies; 8+ messages in thread
From: Andres Lagar-Cavilla @ 2012-09-04 15:11 UTC (permalink / raw)
  To: xen-devel; +Cc: keir, andres, tim, JBeulich

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


Small fix, please consider for 4.2. Thanks.

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

diff -r 3a6050031b9f -r a18d6bd0d127 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 )

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-20 15:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 15:27 [PATCH] Extra check in grant table code for mapping of shared frame Andres Lagar-Cavilla
2012-09-17 11:00 ` 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

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).