lkml.org 
[lkml]   [2009]   [Aug]   [19]   [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'
Wu Fengguang wrote:
> On Wed, Aug 19, 2009 at 10:36:30AM +0800, Amerigo Wang wrote:
>
>> Wu Fengguang wrote:
>>
>>> On Tue, Aug 18, 2009 at 11:08:30AM +0800, Amerigo Wang wrote:
>>>
>>>
>>>
>>>> - proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
>>>> + proc_create("slabinfo",S_IRUGO,NULL,&proc_slabinfo_operations);
>>>>
>>>>
>>> Style nitpick. The spaces were packed to fit into 80-col I guess.
>>>
>>>
>>>
>> Yeah, I noticed this too, the reason I didn't fix this is that I don't
>> want to mix coding style fix with this one. We can fix it in another
>> patch, if you want. :)
>>
>
> Why not? This don't hurt readability of the patch, hehe.
>

Here we go.

Pekka, could you please also take the patch attached below? It is just a
trivial coding style fix. And it is based on the my previous patch.

Thanks!


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



diff --git a/mm/slub.c b/mm/slub.c
index 61398c0..1cd60ff 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1109,8 +1109,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
}

if (kmemcheck_enabled
- && !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS)))
- {
+ && !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS))) {
int pages = 1 << oo_order(oo);

kmemcheck_alloc_shadow(page, oo_order(oo), flags, node);
@@ -2001,7 +2000,7 @@ static inline int calculate_order(int size)
return order;
fraction /= 2;
}
- min_objects --;
+ min_objects--;
}

/*
@@ -4726,7 +4725,7 @@ static const struct file_operations proc_slabinfo_operations = {

static int __init slab_proc_init(void)
{
- proc_create("slabinfo",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-19 12:41    [W:0.777 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site