All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] makedumpfile: fix segfault with -X in XEN environment
@ 2016-08-10 12:56 Martin Wilck
  2016-08-10 12:56 ` [PATCH 1/3] open_dump_bitmap: open bitmap file in non-cyclic case Martin Wilck
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Martin Wilck @ 2016-08-10 12:56 UTC (permalink / raw)
  To: ats-kumagai; +Cc: Martin Wilck, ptesarik, kexec

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


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2016-09-21  6:33 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-10 12:56 [PATCH 0/3] makedumpfile: fix segfault with -X in XEN environment Martin Wilck
2016-08-10 12:56 ` [PATCH 1/3] open_dump_bitmap: open bitmap file in non-cyclic case Martin Wilck
2016-08-10 12:56 ` [PATCH 2/3] move call to open_dump_bitmap() to after call to initial() Martin Wilck
2016-08-10 12:56 ` [PATCH 3/3] close_dump_bitmap: simplify logic Martin Wilck
2016-08-10 13:08   ` Petr Tesarik
2016-08-10 13:35     ` Martin Wilck
2016-08-16  0:37       ` Atsushi Kumagai
2016-08-16  5:59         ` Petr Tesarik
2016-08-17  7:37           ` Martin Wilck
2016-09-06  8:22             ` [PATCH] Cleanup: Use a negative number for uninitialized file descriptors Petr Tesarik
2016-09-09  6:27               ` Atsushi Kumagai
2016-09-09  7:31                 ` Petr Tesarik
2016-09-09  8:11                   ` [PATCH v2] " Petr Tesarik
2016-09-12  8:17                     ` Atsushi Kumagai
2016-09-14 10:17                       ` [PATCH v2 1/3] open_dump_bitmap: open bitmap file in non-cyclic case Martin Wilck
2016-09-14 10:17                         ` [PATCH v2 2/3] move call to open_dump_bitmap() to after call to initial() Martin Wilck
2016-09-14 10:17                         ` [PATCH v2 3/3] close_dump_bitmap: simplify logic Martin Wilck
2016-09-14 11:50                           ` [PATCH v3 " Martin Wilck
2016-09-20  9:43                             ` Atsushi Kumagai
2016-09-20 10:31                               ` Martin Wilck
2016-09-20 10:33                               ` [PATCH v3 1/3] open_dump_bitmap: open bitmap file in non-cyclic case Martin Wilck
2016-09-20 10:33                                 ` [PATCH v3 2/3] move call to open_dump_bitmap() to after call to initial() Martin Wilck
2016-09-20 10:33                                 ` [PATCH v3 3/3] close_dump_bitmap: simplify logic Martin Wilck
2016-09-21  6:29                                 ` [PATCH v3 1/3] open_dump_bitmap: open bitmap file in non-cyclic case Atsushi Kumagai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.