exclude_xen4_user_domain()i calls clear_bit_on_2nd_bitmap(pfn, NULL) to exclude domU ranges. This resolves to set_bitmap(info->bitmap2, pfn, 0, NULL) -> set_bitmap_buffer(info->bitmap2, pfn, 0, NULL) (because bitmap2->fd == 0) ==> segfault, set_bitmap_buffer can't handle NULL as cycle pointer. If non-cyclic approach is used (always under XEN AFAICS), makedumpfile needs a bitmap fd to avoid this crash. But info->flag_cyclic can change after open_dump_bitmap() is called. This patch series fixes that by moving the call to open_dump_bitmap() after the call to initial(). Tested successfully on both Linux and XEN, x86_64. Also submitted to https://sourceforge.net/p/makedumpfile/patches/215/ Martin Wilck (3): open_dump_bitmap: open bitmap file in non-cyclic case move call to open_dump_bitmap() to after call to initial() close_dump_bitmap: simplify logic makedumpfile.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) -- 2.9.2