* [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
@ 2009-08-17 9:43 Amerigo Wang
2009-08-17 9:48 ` Ingo Molnar
0 siblings, 1 reply; 16+ messages in thread
From: Amerigo Wang @ 2009-08-17 9:43 UTC (permalink / raw)
To: linux-kernel
Cc: Pekka Enberg, Vegard Nossum, Eduard - Gabriel Munteanu,
Thomas Gleixner, Ingo Molnar, linux-mm, Christoph Lameter,
David Rientjes, Amerigo Wang, Matt Mackall, Arjan van de Ven
/proc/timer_list and /proc/slabinfo are not supposed to be written,
so there should be no write permissions on it.
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: David Rientjes <rientjes@google.com>
---
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index a999b92..fddd69d 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -286,7 +286,7 @@ static int __init init_timer_list_procfs(void)
{
struct proc_dir_entry *pe;
- pe = proc_create("timer_list", 0644, NULL, &timer_list_fops);
+ pe = proc_create("timer_list", 0444, NULL, &timer_list_fops);
if (!pe)
return -ENOMEM;
return 0;
diff --git a/mm/slab.c b/mm/slab.c
index 7b5d4de..a19e4be 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -4473,7 +4473,7 @@ static const struct file_operations proc_slabstats_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);
#ifdef CONFIG_DEBUG_SLAB_LEAK
proc_create("slab_allocators", 0, NULL, &proc_slabstats_operations);
#endif
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);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-17 9:43 [Patch] proc: drop write permission on 'timer_list' and 'slabinfo' Amerigo Wang
@ 2009-08-17 9:48 ` Ingo Molnar
2009-08-17 9:54 ` Pekka Enberg
0 siblings, 1 reply; 16+ messages in thread
From: Ingo Molnar @ 2009-08-17 9:48 UTC (permalink / raw)
To: Amerigo Wang
Cc: linux-kernel, Pekka Enberg, Vegard Nossum,
Eduard - Gabriel Munteanu, Thomas Gleixner, linux-mm,
Christoph Lameter, David Rientjes, Matt Mackall,
Arjan van de Ven
* Amerigo Wang <amwang@redhat.com> wrote:
> /proc/timer_list and /proc/slabinfo are not supposed to be
> written, so there should be no write permissions on it.
good catch!
> --- a/kernel/time/timer_list.c
> +++ b/kernel/time/timer_list.c
I have applied the timer_list bits to the timer tree. The SLUB/SLAB
bits should go into the SLAB tree i guess.
Thanks,
Ingo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-17 9:48 ` Ingo Molnar
@ 2009-08-17 9:54 ` Pekka Enberg
2009-08-17 16:29 ` Christoph Lameter
0 siblings, 1 reply; 16+ messages in thread
From: Pekka Enberg @ 2009-08-17 9:54 UTC (permalink / raw)
To: Ingo Molnar
Cc: Amerigo Wang, linux-kernel, Vegard Nossum,
Eduard - Gabriel Munteanu, Thomas Gleixner, linux-mm,
Christoph Lameter, David Rientjes, Matt Mackall,
Arjan van de Ven
On Mon, 2009-08-17 at 11:48 +0200, Ingo Molnar wrote:
> * Amerigo Wang <amwang@redhat.com> wrote:
>
> > /proc/timer_list and /proc/slabinfo are not supposed to be
> > written, so there should be no write permissions on it.
>
> good catch!
>
> > --- a/kernel/time/timer_list.c
> > +++ b/kernel/time/timer_list.c
>
> I have applied the timer_list bits to the timer tree. The SLUB/SLAB
> bits should go into the SLAB tree i guess.
Yeah, I'll grab the slab parts to slab.git if I don't see a separate
patch in my inbox when I get home. Thanks!
Pekka
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-17 9:54 ` Pekka Enberg
@ 2009-08-17 16:29 ` Christoph Lameter
2009-08-17 16:35 ` Pekka Enberg
0 siblings, 1 reply; 16+ messages in thread
From: Christoph Lameter @ 2009-08-17 16:29 UTC (permalink / raw)
To: Pekka Enberg
Cc: Ingo Molnar, Amerigo Wang, linux-kernel, Vegard Nossum,
Eduard - Gabriel Munteanu, Thomas Gleixner, linux-mm,
David Rientjes, Matt Mackall, Arjan van de Ven
On Mon, 17 Aug 2009, Pekka Enberg wrote:
> > I have applied the timer_list bits to the timer tree. The SLUB/SLAB
> > bits should go into the SLAB tree i guess.
>
> Yeah, I'll grab the slab parts to slab.git if I don't see a separate
> patch in my inbox when I get home. Thanks!
slab needs the write permissions for tuning!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-17 16:29 ` Christoph Lameter
@ 2009-08-17 16:35 ` Pekka Enberg
2009-08-17 16:41 ` Christoph Lameter
0 siblings, 1 reply; 16+ messages in thread
From: Pekka Enberg @ 2009-08-17 16:35 UTC (permalink / raw)
To: Christoph Lameter
Cc: Ingo Molnar, Amerigo Wang, linux-kernel, Vegard Nossum,
Eduard - Gabriel Munteanu, Thomas Gleixner, linux-mm,
David Rientjes, Matt Mackall, Arjan van de Ven
Hi Christoph,
Christoph Lameter wrote:
> On Mon, 17 Aug 2009, Pekka Enberg wrote:
>
>>> I have applied the timer_list bits to the timer tree. The SLUB/SLAB
>>> bits should go into the SLAB tree i guess.
>> Yeah, I'll grab the slab parts to slab.git if I don't see a separate
>> patch in my inbox when I get home. Thanks!
>
> 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?
Pekka
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-17 16:35 ` Pekka Enberg
@ 2009-08-17 16:41 ` Christoph Lameter
2009-08-18 1:59 ` Amerigo Wang
0 siblings, 1 reply; 16+ messages in thread
From: Christoph Lameter @ 2009-08-17 16:41 UTC (permalink / raw)
To: Pekka Enberg
Cc: Ingo Molnar, Amerigo Wang, linux-kernel, Vegard Nossum,
Eduard - Gabriel Munteanu, Thomas Gleixner, linux-mm,
David Rientjes, Matt Mackall, Arjan van de Ven
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?
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.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-17 16:41 ` Christoph Lameter
@ 2009-08-18 1:59 ` Amerigo Wang
2009-08-18 1:59 ` Li Zefan
0 siblings, 1 reply; 16+ messages in thread
From: Amerigo Wang @ 2009-08-18 1:59 UTC (permalink / raw)
To: Christoph Lameter
Cc: Pekka Enberg, Ingo Molnar, linux-kernel, Vegard Nossum,
Eduard - Gabriel Munteanu, Thomas Gleixner, linux-mm,
David Rientjes, Matt Mackall, Arjan van de Ven
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
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>
[-- Attachment #2: proc-file-write-permission-fix2.diff --]
[-- Type: text/plain, Size: 422 bytes --]
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);
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-18 1:59 ` Amerigo Wang
@ 2009-08-18 1:59 ` Li Zefan
2009-08-18 3:08 ` Amerigo Wang
2009-08-18 16:12 ` Pekka Enberg
0 siblings, 2 replies; 16+ messages in thread
From: Li Zefan @ 2009-08-18 1:59 UTC (permalink / raw)
To: Amerigo Wang
Cc: Christoph Lameter, Pekka Enberg, Ingo Molnar, linux-kernel,
Vegard Nossum, Eduard - Gabriel Munteanu, Thomas Gleixner,
linux-mm, David Rientjes, Matt Mackall, Arjan van de Ven
> 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
> return 0;
> }
> module_init(slab_proc_init);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-18 1:59 ` Li Zefan
@ 2009-08-18 3:08 ` Amerigo Wang
2009-08-18 12:00 ` Wu Fengguang
2009-08-18 16:12 ` Pekka Enberg
1 sibling, 1 reply; 16+ messages in thread
From: Amerigo Wang @ 2009-08-18 3:08 UTC (permalink / raw)
To: Li Zefan
Cc: Christoph Lameter, Pekka Enberg, Ingo Molnar, linux-kernel,
Vegard Nossum, Eduard - Gabriel Munteanu, Thomas Gleixner,
linux-mm, David Rientjes, Matt Mackall, Arjan van de Ven
[-- Attachment #1: Type: text/plain, Size: 344 bytes --]
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>
[-- Attachment #2: proc-file-write-permission-fix2.diff --]
[-- Type: text/plain, Size: 414 bytes --]
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);
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-18 3:08 ` Amerigo Wang
@ 2009-08-18 12:00 ` Wu Fengguang
2009-08-19 2:36 ` Amerigo Wang
0 siblings, 1 reply; 16+ messages in thread
From: Wu Fengguang @ 2009-08-18 12:00 UTC (permalink / raw)
To: Amerigo Wang
Cc: Li Zefan, Christoph Lameter, Pekka Enberg, Ingo Molnar,
linux-kernel, Vegard Nossum, Eduard - Gabriel Munteanu,
Thomas Gleixner, linux-mm, David Rientjes, Matt Mackall,
Arjan van de Ven
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.
ERROR: space required after that ',' (ctx:VxV)
#10: FILE: mm/slub.c:4729:
+ proc_create("slabinfo",S_IRUGO,NULL,&proc_slabinfo_operations);
^
ERROR: space required after that ',' (ctx:VxV)
#10: FILE: mm/slub.c:4729:
+ proc_create("slabinfo",S_IRUGO,NULL,&proc_slabinfo_operations);
^
ERROR: space required after that ',' (ctx:VxO)
#10: FILE: mm/slub.c:4729:
+ proc_create("slabinfo",S_IRUGO,NULL,&proc_slabinfo_operations);
^
ERROR: space required before that '&' (ctx:OxV)
#10: FILE: mm/slub.c:4729:
+ proc_create("slabinfo",S_IRUGO,NULL,&proc_slabinfo_operations);
^
Thanks,
Fengguang
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-18 1:59 ` Li Zefan
2009-08-18 3:08 ` Amerigo Wang
@ 2009-08-18 16:12 ` Pekka Enberg
1 sibling, 0 replies; 16+ messages in thread
From: Pekka Enberg @ 2009-08-18 16:12 UTC (permalink / raw)
To: Li Zefan
Cc: Amerigo Wang, Christoph Lameter, Ingo Molnar, linux-kernel,
Vegard Nossum, Eduard - Gabriel Munteanu, Thomas Gleixner,
linux-mm, David Rientjes, Matt Mackall, Arjan van de Ven
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
>
>> return 0;
>> }
>> module_init(slab_proc_init);
>
I went ahead and fixed that. Applied, thanks everyone!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-18 12:00 ` Wu Fengguang
@ 2009-08-19 2:36 ` Amerigo Wang
2009-08-19 2:37 ` Wu Fengguang
0 siblings, 1 reply; 16+ messages in thread
From: Amerigo Wang @ 2009-08-19 2:36 UTC (permalink / raw)
To: Wu Fengguang
Cc: Li Zefan, Christoph Lameter, Pekka Enberg, Ingo Molnar,
linux-kernel, Vegard Nossum, Eduard - Gabriel Munteanu,
Thomas Gleixner, linux-mm, David Rientjes, Matt Mackall,
Arjan van de Ven
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. :)
Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-19 2:36 ` Amerigo Wang
@ 2009-08-19 2:37 ` Wu Fengguang
2009-08-19 10:39 ` Amerigo Wang
0 siblings, 1 reply; 16+ messages in thread
From: Wu Fengguang @ 2009-08-19 2:37 UTC (permalink / raw)
To: Amerigo Wang
Cc: Li Zefan, Christoph Lameter, Pekka Enberg, Ingo Molnar,
linux-kernel, Vegard Nossum, Eduard - Gabriel Munteanu,
Thomas Gleixner, linux-mm, David Rientjes, Matt Mackall,
Arjan van de Ven
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.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-19 2:37 ` Wu Fengguang
@ 2009-08-19 10:39 ` Amerigo Wang
2009-08-19 18:47 ` Pekka Enberg
0 siblings, 1 reply; 16+ messages in thread
From: Amerigo Wang @ 2009-08-19 10:39 UTC (permalink / raw)
To: Wu Fengguang
Cc: Li Zefan, Christoph Lameter, Pekka Enberg, Ingo Molnar,
linux-kernel, Vegard Nossum, Eduard - Gabriel Munteanu,
Thomas Gleixner, linux-mm, David Rientjes, Matt Mackall,
Arjan van de Ven
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
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>
[-- Attachment #2: mm-slub_c-style-fix.diff --]
[-- Type: text/plain, Size: 915 bytes --]
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);
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-19 10:39 ` Amerigo Wang
@ 2009-08-19 18:47 ` Pekka Enberg
2009-08-20 10:34 ` Amerigo Wang
0 siblings, 1 reply; 16+ messages in thread
From: Pekka Enberg @ 2009-08-19 18:47 UTC (permalink / raw)
To: Amerigo Wang
Cc: Wu Fengguang, Li Zefan, Christoph Lameter, Ingo Molnar,
linux-kernel, Vegard Nossum, Eduard - Gabriel Munteanu,
Thomas Gleixner, linux-mm, David Rientjes, Matt Mackall,
Arjan van de Ven
Amerigo Wang wrote:
> 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.
The last hunk was already in slab.git because I fixed your patch up by
hand. I applied the rest but can you please send proper patches in the
future? That is, no attachments and a "git am" friendly subject line.
Thanks!
Pekka
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo'
2009-08-19 18:47 ` Pekka Enberg
@ 2009-08-20 10:34 ` Amerigo Wang
0 siblings, 0 replies; 16+ messages in thread
From: Amerigo Wang @ 2009-08-20 10:34 UTC (permalink / raw)
To: Pekka Enberg
Cc: Wu Fengguang, Li Zefan, Christoph Lameter, Ingo Molnar,
linux-kernel, Vegard Nossum, Eduard - Gabriel Munteanu,
Thomas Gleixner, linux-mm, David Rientjes, Matt Mackall,
Arjan van de Ven
Pekka Enberg wrote:
> Amerigo Wang wrote:
>> 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.
>
> The last hunk was already in slab.git because I fixed your patch up by
> hand. I applied the rest but can you please send proper patches in the
> future? That is, no attachments and a "git am" friendly subject line.
> Thanks!
Nice. Thanks!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2009-08-20 10:32 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-17 9:43 [Patch] proc: drop write permission on 'timer_list' and 'slabinfo' Amerigo Wang
2009-08-17 9:48 ` Ingo Molnar
2009-08-17 9:54 ` Pekka Enberg
2009-08-17 16:29 ` Christoph Lameter
2009-08-17 16:35 ` Pekka Enberg
2009-08-17 16:41 ` Christoph Lameter
2009-08-18 1:59 ` Amerigo Wang
2009-08-18 1:59 ` Li Zefan
2009-08-18 3:08 ` Amerigo Wang
2009-08-18 12:00 ` Wu Fengguang
2009-08-19 2:36 ` Amerigo Wang
2009-08-19 2:37 ` Wu Fengguang
2009-08-19 10:39 ` Amerigo Wang
2009-08-19 18:47 ` Pekka Enberg
2009-08-20 10:34 ` Amerigo Wang
2009-08-18 16:12 ` Pekka Enberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox