debuggers.hg
changeset 19664:145e49b8574c
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@citrix.com>
structure when we don't hold the lock.
Signed-off-by: Steven Smith <steven.smith@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue May 19 23:44:28 2009 +0100 (2009-05-19) |
parents | d8d0f32090cb |
children | 070f456143d3 |
files | xen/common/grant_table.c |
line diff
1.1 --- a/xen/common/grant_table.c Tue May 19 23:30:32 2009 +0100 1.2 +++ b/xen/common/grant_table.c Tue May 19 23:44:28 2009 +0100 1.3 @@ -199,6 +199,7 @@ static void 1.4 unsigned long frame = 0, nr_gets = 0; 1.5 int rc = GNTST_okay; 1.6 u32 old_pin; 1.7 + u32 act_pin; 1.8 unsigned int cache_flags; 1.9 struct active_grant_entry *act; 1.10 struct grant_mapping *mt; 1.11 @@ -329,6 +330,7 @@ static void 1.12 GNTPIN_hstr_inc : GNTPIN_hstw_inc; 1.13 1.14 frame = act->frame; 1.15 + act_pin = act->pin; 1.16 1.17 cache_flags = (sha->flags & (GTF_PAT | GTF_PWT | GTF_PCD) ); 1.18 1.19 @@ -391,7 +393,7 @@ static void 1.20 1.21 if ( need_iommu(ld) && 1.22 !(old_pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) && 1.23 - (act->pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) ) 1.24 + (act_pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) ) 1.25 { 1.26 if ( iommu_map_page(ld, mfn_to_gmfn(ld, frame), frame) ) 1.27 {