lkml.org 
[lkml]   [2009]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
Li Zefan wrote:
>> static int __init slab_proc_init(void)
>> {
>> - proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
>> + proc_create("slabinfo",S_IRUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
>>
>
> S_IRUSR|S_IRUGO == S_IRUGO
>
>

Ah, yeah. Thanks!

Update it.

Signed-off-by: WANG Cong <amwang@redhat.com>


diff --git a/mm/slub.c b/mm/slub.c
index b9f1491..61398c0 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4726,7 +4726,7 @@ static const struct file_operations proc_slabinfo_operations = {

static int __init slab_proc_init(void)
{
- proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
+ proc_create("slabinfo",S_IRUGO,NULL,&proc_slabinfo_operations);
return 0;
}
module_init(slab_proc_init);
\
 
 \ /
  Last update: 2009-08-18 05:09    [W:0.101 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site