File xsa218-3.patch of Package xen.5424
From: Jan Beulich <jbeulich@suse.com>
Subject: gnttab: correct maptrack table accesses
In order to observe a consistent (limit,pointer-table) pair, the reader
needs to either hold the grant table lock or both sides need to order
their accesses suitably (the writer side barrier is already there). Add
the missing barrier.
This is part of XSA-218.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -908,7 +908,9 @@ __gnttab_unmap_common(
return;
}
+ smp_rmb();
map = &maptrack_entry(lgt, op->handle);
+
spin_lock(&lgt->lock);
if ( unlikely(!map->flags) )