lkml.org 
[lkml]   [2018]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kmemleak: Always register debugfs file
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 <vincent.whitchurch@axis.com>

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>

\
 
 \ /
  Last update: 2018-08-24 17:24    [W:0.490 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site