[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/8] exec: make address_space_cache_destroy idempote
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 4/8] exec: make address_space_cache_destroy idempotent |
Date: |
Tue, 24 Jan 2017 19:04:16 +0100 |
Clear cache->mr so that address_space_cache_destroy does nothing
the second time it is called.
Signed-off-by: Paolo Bonzini <address@hidden>
---
exec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/exec.c b/exec.c
index f2bed92..5de15cf 100644
--- a/exec.c
+++ b/exec.c
@@ -3165,6 +3165,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
--
2.9.3