lkml.org 
[lkml]   [2017]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] kmemleak: change /sys/kernel/debug/kmemleak permissions from 0444 to 0644
From
Date
Kmemleak could be tweaked in runtime by writing commands into debugfs file.
Root anyway can use it, but without write-bit this interface isn't obvious.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
mm/kmemleak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 7780cd83a495..fca3452e56c1 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -2104,7 +2104,7 @@ static int __init kmemleak_late_init(void)
return -ENOMEM;
}

- dentry = debugfs_create_file("kmemleak", S_IRUGO, NULL, NULL,
+ dentry = debugfs_create_file("kmemleak", 0644, NULL, NULL,
&kmemleak_fops);
if (!dentry)
pr_warn("Failed to create the debugfs kmemleak file\n");
\
 
 \ /
  Last update: 2017-10-06 13:40    [W:0.031 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site