Commit Graph

1 Commits

Author SHA1 Message Date
WANG Chao
dd7eee7e4a makedumpfile: Fall back to read() when mmap() fails
This is a backport of the following upstream commit:

commit 7c770ed
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Thu Dec 12 16:40:31 2013 +0900

    [PATCH] Fall back to read() when mmap() fails.

    This is a fall back path for mmap().
    This patch disables mmap() when facing the issues related to mmap(),
    and read() will be used to read vmcore instead.

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

mmap() file operation on vmcore is working properly when the page being
accessed has different attributes on different part (ie. two different type
of memory ranges are overlapping).

A fall back mechanism is introduced in this patch, in case mmap() fails,
switch to read() afterwards.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-01-17 11:32:48 +08:00