Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a12f1820 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "kmemleak : Make module scanning optional using config"

parents 3143bec6 33778071
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2402,7 +2402,13 @@ static void *module_alloc_update_bounds(unsigned long size)
	return ret;
}

#ifdef CONFIG_DEBUG_KMEMLEAK
#if defined(CONFIG_DEBUG_KMEMLEAK) && defined(CONFIG_DEBUG_MODULE_SCAN_OFF)
static void kmemleak_load_module(const struct module *mod,
				 const struct load_info *info)
{
	kmemleak_no_scan(mod->module_core);
}
#elif defined(CONFIG_DEBUG_KMEMLEAK)
static void kmemleak_load_module(const struct module *mod,
				 const struct load_info *info)
{
+9 −0
Original line number Diff line number Diff line
@@ -925,6 +925,15 @@ config TIMER_STATS
	  (it defaults to deactivated on bootup and will only be activated
	  if some application like powertop activates it explicitly).

config DEBUG_MODULE_SCAN_OFF
	bool "Disable module memory scan for leaks by default"
	depends on DEBUG_KMEMLEAK
	help
	  Say Y here to disable scanning kernel modules area list
	  by default for memory leaks. Module scan an potentially
	  run with irq/preemption disabled for considerable amount
	  of time.

config DEBUG_PREEMPT
	bool "Debug preemptible kernel"
	depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT