OSDN Git Service

mm: kmemleak: Don't require global debug options
authorSultan Alsawaf <sultan@kerneltoast.com>
Sun, 7 Jul 2019 01:59:34 +0000 (18:59 -0700)
committer0ranko0P <ranko0p@outlook.com>
Sat, 7 Dec 2019 10:22:17 +0000 (18:22 +0800)
This allows kmemleak to function even when debugfs is globally disabled,
allowing kmemleak to give accurate results for CONFIG_DEBUG_FS=n.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
lib/Kconfig.debug
mm/Makefile

index 54c82f7..8451d01 100644 (file)
@@ -504,8 +504,7 @@ config HAVE_DEBUG_KMEMLEAK
 
 config DEBUG_KMEMLEAK
        bool "Kernel memory leak detector"
-       depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
-       select DEBUG_FS
+       depends on HAVE_DEBUG_KMEMLEAK
        select STACKTRACE if STACKTRACE_SUPPORT
        select KALLSYMS
        select CRC32
index 04d48b4..9953098 100644 (file)
@@ -103,3 +103,5 @@ obj-$(CONFIG_IDLE_PAGE_TRACKING) += page_idle.o
 obj-$(CONFIG_FRAME_VECTOR) += frame_vector.o
 obj-$(CONFIG_PROCESS_RECLAIM)  += process_reclaim.o
 obj-$(CONFIG_HARDENED_USERCOPY) += usercopy.o
+
+CFLAGS_kmemleak.o += -DCONFIG_DEBUG_FS