mm: Kconfig: Add DEBUG_SLUB_PANIC_ON option
Add the DEBUG_SLUB_PANIC_ON option to KCONFIG preventing
the existing defconfig option from being overwritten
by make config.
This will induce a panic if slab debug catches corruptions
within the padding of a given object.
The intention here is to induce collection of data
immediately after the corruption is detected with
the goal to catch the possible source of the corruption.
Change-Id: Idffa42de790b9e096e28f7e1f484d86c013d7d83
Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org>
diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
index afcc550..b9019d4 100644
--- a/mm/Kconfig.debug
+++ b/mm/Kconfig.debug
@@ -32,6 +32,16 @@
enabled by DEBUG_PAGEALLOC_ENABLE_DEFAULT or the debug_pagealloc
command line parameter.
+config SLUB_DEBUG_PANIC_ON
+ bool "Enable to Panic on SLUB corruption detection"
+ depends on SLUB_DEBUG
+ help
+ SLUB has a resiliency feature enabled which restores bytes in
+ order for production environments to continue to operate. IN
+ debug options this may not be desirable as it prevents from
+ investigating the root cause which may be rooted within cache
+ or memory.
+
config DEBUG_PAGEALLOC_ENABLE_DEFAULT
bool "Enable debug page memory allocations by default?"
default n