diff options
author | Pratyush Anand <panand@redhat.com> | 2017-08-17 12:47:13 +0900 |
---|---|---|
committer | Atsushi Kumagai <ats-kumagai@wm.jp.nec.com> | 2018-01-23 11:41:24 +0900 |
commit | 4bf4f2b0a855ccf4c7ffe13290778e92b2f5bbc9 (patch) | |
tree | 494df7ad5c0b3f8e1444a5aedc023d3b75f5a839 /makedumpfile.c | |
parent | 27508f10fb689a1b0e7f62c607b6994ba5521996 (diff) |
[PATCH v2] Fix SECTION_MAP_MASK for kernel >= v.13
* Required for kernel 4.13
commit 2d070eab2e82 "mm: consider zone which is not fully populated to
have holes" added a new flag SECTION_IS_ONLINE and therefore
SECTION_MAP_MASK has been changed. We are not able to find correct
mem_map in makedumpfile for kernel version v4.13-rc1 and onward because
of the above kernel change.
This patch fixes the MASK value keeping the code backward compatible
Signed-off-by: Pratyush Anand <panand@redhat.com>
Diffstat (limited to 'makedumpfile.c')
-rw-r--r-- | makedumpfile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/makedumpfile.c b/makedumpfile.c index 30230a1..c975651 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -3304,7 +3304,10 @@ section_mem_map_addr(unsigned long addr) return NOT_KV_ADDR; } map = ULONG(mem_section + OFFSET(mem_section.section_mem_map)); - map &= SECTION_MAP_MASK; + if (info->kernel_version < KERNEL_VERSION(4, 13, 0)) + map &= SECTION_MAP_MASK_4_12; + else + map &= SECTION_MAP_MASK; free(mem_section); return map; |