gnttab: correct maptrack table access

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>
master commit: 4b78efa91c
master date: 2017-06-20 14:34:34 +0200
This commit is contained in:
Jan Beulich committed 2017-06-20 16:52:39 +02:00
1 parent 773094e240
commit c5de05e82f
1 file changed
+2
+2
View File
@@ -908,7 +908,9 @@ __gnttab_unmap_common(
return;
}
smp_rmb();
map = &maptrack_entry(lgt, op->handle);
spin_lock(&lgt->lock);
if ( unlikely(!map->flags) )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.