[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:
kaf24@firebug.cl.cam.ac.uk committed 2006-06-15 11:35:23 +01:00
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);
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.