mm: kmemleak: Don't require global debug options or debugfs
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> Signed-off-by: Carlos Jimenez (JavaShin-X) <javashin1986@gmail.com>
This commit is contained in:
parent
a8bcf50477
commit
725df8b76b
|
@ -123,7 +123,11 @@ obj-$(CONFIG_NILFS2_FS) += nilfs2/
|
|||
obj-$(CONFIG_BEFS_FS) += befs/
|
||||
obj-$(CONFIG_HOSTFS) += hostfs/
|
||||
obj-$(CONFIG_CACHEFILES) += cachefiles/
|
||||
obj-$(CONFIG_DEBUG_FS) += debugfs/
|
||||
ifeq ($(CONFIG_DEBUG_FS),y)
|
||||
obj-y += debugfs/
|
||||
else
|
||||
obj-$(CONFIG_DEBUG_KMEMLEAK) += debugfs/
|
||||
endif
|
||||
obj-$(CONFIG_TRACING) += tracefs/
|
||||
obj-$(CONFIG_OCFS2_FS) += ocfs2/
|
||||
obj-$(CONFIG_BTRFS_FS) += btrfs/
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
debugfs-objs := inode.o file.o
|
||||
|
||||
obj-$(CONFIG_DEBUG_FS) += debugfs.o
|
||||
ifeq ($(CONFIG_DEBUG_KMEMLEAK),y)
|
||||
ccflags-y := -DCONFIG_DEBUG_FS
|
||||
endif
|
||||
|
||||
obj-y += debugfs.o
|
||||
|
|
|
@ -589,8 +589,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
|
||||
|
|
|
@ -105,3 +105,5 @@ obj-$(CONFIG_HARDENED_USERCOPY) += usercopy.o
|
|||
obj-$(CONFIG_PERCPU_STATS) += percpu-stats.o
|
||||
obj-$(CONFIG_HMM) += hmm.o
|
||||
obj-$(CONFIG_PROCESS_RECLAIM) += process_reclaim.o
|
||||
|
||||
CFLAGS_kmemleak.o += -DCONFIG_DEBUG_FS
|
||||
|
|
Loading…
Reference in New Issue