[PATCH] makedumpfile: Use file offset in initialize_mmap()

Atsushi Kumagai kumagai-atsushi at mxc.nes.nec.co.jp
Mon Mar 2 17:31:57 PST 2015


Hello Petr,

>Hi all,
>
>update_mmap_range() expects a file offset as its first argument, but
>initialize_mmap() passes a physical address. Since the first segment
>usually starts at physical addr 0 on S/390, but there is no segment
>at file offset 0, update_mmap_range() fails, and makedumpfile falls
>back to read().

I'll merge it into v1.5.8, thanks.


Thanks
Atsushi Kumagai

>@Michael: I wonder how you actually tested the kernel mmap patches;
>this bug has prevented mmap on all my s390 systems...
>
>Signed-off-by: Petr Tesarik <ptesarik at suse.cz>
>
>---
> makedumpfile.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>--- a/makedumpfile.c
>+++ b/makedumpfile.c
>@@ -347,7 +347,7 @@ initialize_mmap(void) {
> 	info->mmap_buf = MAP_FAILED;
>
> 	get_pt_load(0, &phys_start, NULL, NULL, NULL);
>-	if (!update_mmap_range(phys_start, 1))
>+	if (!update_mmap_range(paddr_to_offset(phys_start), 1))
> 		return FALSE;
>
> 	return TRUE;



More information about the kexec mailing list