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'
Christoph Lameter wrote:
> On Mon, 17 Aug 2009, Pekka Enberg wrote:
>
>
>>> slab needs the write permissions for tuning!
>>>
>> Oh, crap, you're right, I had forgotten about that. It's probably best to keep
>> slub permissions as-is, no?
>>

Oops! I misread the code... sorry.

>
> slub perms can be changed. The patch is okay for that. But there is no
> write method in slub. Effectively it makes no difference. Just the
> display is nicer in /proc.
>
>
>
Ah, ok, I update this part of patch, attached.

Thanks!

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



diff --git a/mm/slub.c b/mm/slub.c
index b9f1491..aba2c1b 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_IRUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
return 0;
}
module_init(slab_proc_init);
\
 
 \ /
  Last update: 2009-08-18 04:01    [W:0.061 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site