Thread (2 messages) 2 messages, 2 authors, 2018-08-24

Re: [PATCH] kmemleak: Always register debugfs file

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2018-08-24 15:23:56
Also in: lkml

On Fri, Aug 24, 2018 at 03:12:20PM +0200, Vincent Whitchurch wrote:
If kmemleak built in to the kernel, but is disabled by default, the
debugfs file is never registered.  Because of this, it is not possible
to find out if the kernel is built with kmemleak support by checking for
the presence of this file.  To allow this, always register the file.

After this patch, if the file doesn't exist, kmemleak is not available
in the kernel.  If writing "scan" or any other value than "clear" to
this file results in EBUSY, then kmemleak is available but is disabled
by default and can be activated via the kernel command line.

Signed-off-by: Vincent Whitchurch <redacted>
I think that's also consistent with a late disabling of kmemleak when
the debugfs entry sticks around.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help