Messages in this thread Patch in this message | | | Date | Tue, 18 Aug 2009 09:59:41 +0800 | From | Amerigo Wang <> | Subject | Re: [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); | |