mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[LINUX] Only destroy a machine-contiguous memory region if
it really is contiguous (e.g., create_contiguous did not fail). Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
c33ae33cb8
commit
aedc7640e6
1 file changed
+2
-1
@@ -365,7 +365,8 @@ void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order)
|
||||
};
|
||||
set_xen_guest_handle(reservation.extent_start, &frame);
|
||||
|
||||
if (xen_feature(XENFEAT_auto_translated_physmap))
|
||||
if (xen_feature(XENFEAT_auto_translated_physmap) ||
|
||||
!test_bit(__pa(vstart) >> PAGE_SHIFT, contiguous_bitmap))
|
||||
return;
|
||||
|
||||
scrub_pages(vstart, 1 << order);
|
||||
|
||||