diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-01-27 16:40:15 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-02-17 21:52:30 +0200 |
commit | 91047df38dffa80222179f63fbb74c1dfefa25ed (patch) | |
tree | c38d5210dd4f22eeab16ed257aa06637adfb5d54 /exec.c | |
parent | 9796d0ac8fb0a8d522afd409cb25a607eae61617 (diff) |
exec: make address_space_cache_destroy idempotent
Clear cache->mr so that address_space_cache_destroy does nothing
the second time it is called.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3166,6 +3166,7 @@ void address_space_cache_destroy(MemoryRegionCache *cache) xen_invalidate_map_cache_entry(cache->ptr); } memory_region_unref(cache->mr); + cache->mr = NULL; } /* Called from RCU critical section. This function has the same |