[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.4-testing] gnttab: for sanity's sake, don't access the active grant table



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1243863311 -3600
# Node ID 7998fa60ec4ba080d89d7c7e93c001f9937db471
# Parent  5187513d78a8f3f622b666f65a562e1b6e9c74a5
gnttab: for sanity's sake, don't access the active grant table
structure when we don't hold the lock.

Signed-off-by: Steven Smith <steven.smith@xxxxxxxxxx>
xen-unstable changeset:   19626:145e49b8574c
xen-unstable date:        Tue May 19 23:44:28 2009 +0100
---
 xen/common/grant_table.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 5187513d78a8 -r 7998fa60ec4b xen/common/grant_table.c
--- a/xen/common/grant_table.c  Mon Jun 01 14:34:51 2009 +0100
+++ b/xen/common/grant_table.c  Mon Jun 01 14:35:11 2009 +0100
@@ -199,6 +199,7 @@ __gnttab_map_grant_ref(
     unsigned long  frame = 0, nr_gets = 0;
     int            rc = GNTST_okay;
     u32            old_pin;
+    u32            act_pin;
     unsigned int   cache_flags;
     struct active_grant_entry *act;
     struct grant_mapping *mt;
@@ -329,6 +330,7 @@ __gnttab_map_grant_ref(
             GNTPIN_hstr_inc : GNTPIN_hstw_inc;
 
     frame = act->frame;
+    act_pin = act->pin;
 
     cache_flags = (sha->flags & (GTF_PAT | GTF_PWT | GTF_PCD) );
 
@@ -391,7 +393,7 @@ __gnttab_map_grant_ref(
 
     if ( need_iommu(ld) &&
          !(old_pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) &&
-         (act->pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) )
+         (act_pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) )
     {
         if ( iommu_map_page(ld, mfn_to_gmfn(ld, frame), frame) )
         {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.