gnttab: improve GNTTABOP_cache_flush locking
authorJan Beulich <jbeulich@suse.com>
Mon, 4 Dec 2017 10:04:18 +0000 (11:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 Dec 2017 10:04:18 +0000 (11:04 +0100)
commit553ac37137c2d1c03bf1b69cfb192ffbfe29daa4
tree17059bb312d8f4402e89e86180ca3b469fe0ee2b
parent9c22e4d67f5552c7c896ed83bd95d5d4c5837a9d
gnttab: improve GNTTABOP_cache_flush locking

Dropping the lock before returning from grant_map_exists() means handing
possibly stale information back to the caller. Return back the pointer
to the active entry instead, for the caller to release the lock once
done.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andre Przywara <andre.przywara@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/common/grant_table.c