From 8777aa80bb8401daa7bdbd3e42781c0c52879167 Mon Sep 17 00:00:00 2001 From: Prasad Sodagudi Date: Thu, 25 Feb 2016 12:57:06 +0530 Subject: [PATCH] debug-pagealloc: Panic on pagealloc corruption Currently, we just print the pagealloc corruption warnings and proceed. Sometimes, we are getting multiple errors printed down the line. It will be good to get the device state as early as possible when we get the first pagealloc error. Change-Id: I79155ac8a039b30a3a98d5dd1384d3923082712f Signed-off-by: Subbaraman Narayanamurthy Signed-off-by: Prasad Sodagudi Signed-off-by: Patrick Daly Signed-off-by: Sudarshan Rajagopalan Signed-off-by: Isaac J. Manjarres --- mm/page_poison.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/page_poison.c b/mm/page_poison.c index a32c78e10744..b0c3a4cb6265 100644 --- a/mm/page_poison.c +++ b/mm/page_poison.c @@ -94,6 +94,7 @@ static void check_poison_mem(struct page *page, print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 16, 1, start, end - start + 1, 1); + BUG_ON(PANIC_CORRUPTION); dump_stack(); }