[Devel] [PATCH RHEL7 COMMIT] mm: issue panic() on bad page/pte bugs if panic_on_warn is set
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Oct 12 12:51:26 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-693.1.1.vz7.37.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.1.1.vz7.37.12
------>
commit aeb779949e1d0df996d4382ac5ec5372288800ec
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Thu Oct 12 12:51:26 2017 +0300
mm: issue panic() on bad page/pte bugs if panic_on_warn is set
Bad page state bugs is serious issue. It's worth issue panic if
panic_on_warn is set to collect crash dump and catch issue earlier.
https://jira.sw.ru/browse/PSBM-70168
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
mm/memory.c | 2 ++
mm/page_alloc.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/mm/memory.c b/mm/memory.c
index c30a042..b1c6968 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -733,6 +733,8 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
vma->vm_file->f_op->mmap);
dump_stack();
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
+ if (panic_on_warn)
+ panic("panic_on_warn set ...\n");
}
/*
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 0ee5e9a..137d1d8 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -463,6 +463,8 @@ static void bad_page(struct page *page, char *reason, unsigned long bad_flags)
/* Leave bad fields for debug, except PageBuddy could make trouble */
page_mapcount_reset(page); /* remove PageBuddy */
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
+ if (panic_on_warn)
+ panic("panic_on_warn set ...\n");
}
/*
More information about the Devel
mailing list