aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Kumagai <[email protected]>2016-04-28 16:18:21 -0700
committerLinus Torvalds <[email protected]>2016-04-28 19:34:04 -0700
commitd7f53518f713d3d9bf5ed150f943853fb94e7473 (patch)
tree4fdd506ffcbf64fb211c70e8bce92c251af903cf
parent8639a847b0e11f8d2daa3eafe15a9609c91fd357 (diff)
kexec: export OFFSET(page.compound_head) to find out compound tail page
PageAnon() always look at head page to check PAGE_MAPPING_ANON and tail page's page->mapping has just a poisoned data since commit 1c290f642101 ("mm: sanitize page->mapping for tail pages"). If makedumpfile checks page->mapping of a compound tail page to distinguish anonymous page as usual, it must fail in newer kernel. So it's necessary to export OFFSET(page.compound_head) to avoid checking compound tail pages. The problem is that unnecessary hugepages won't be removed from a dump file in kernels 4.5.x and later. This means that extra disk space would be consumed. It's a problem, but not critical. Signed-off-by: Atsushi Kumagai <[email protected]> Acked-by: Dave Young <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Vivek Goyal <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--kernel/kexec_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index cbbb4c724149..1391d3ee3b86 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -1417,6 +1417,7 @@ static int __init crash_save_vmcoreinfo_init(void)
VMCOREINFO_OFFSET(page, private);
VMCOREINFO_OFFSET(page, compound_dtor);
VMCOREINFO_OFFSET(page, compound_order);
+ VMCOREINFO_OFFSET(page, compound_head);
VMCOREINFO_OFFSET(pglist_data, node_zones);
VMCOREINFO_OFFSET(pglist_data, nr_zones);
#ifdef CONFIG_FLAT_NODE_MEM_MAP