* [PATCH] memcg: fix oops in mem_cgroup_shrink_usage
@ 2008-08-06 14:15 Hugh Dickins
2008-08-06 16:13 ` kamezawa.hiroyu
2008-08-06 16:21 ` Balbir Singh
0 siblings, 2 replies; 3+ messages in thread
From: Hugh Dickins @ 2008-08-06 14:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: KAMEZAWA Hiroyuki, Balbir Singh, linux-kernel
Got an oops in mem_cgroup_shrink_usage() when testing loop over tmpfs:
yes, of course, loop0 has no mm: other entry points check but this didn't.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
mm/memcontrol.c | 2 ++
1 file changed, 2 insertions(+)
--- 2.6.27-rc2/mm/memcontrol.c 2008-08-06 08:36:20.000000000 +0100
+++ linux/mm/memcontrol.c 2008-08-06 09:05:26.000000000 +0100
@@ -796,6 +796,8 @@ int mem_cgroup_shrink_usage(struct mm_st
if (mem_cgroup_subsys.disabled)
return 0;
+ if (!mm)
+ return 0;
rcu_read_lock();
mem = mem_cgroup_from_task(rcu_dereference(mm->owner));
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] memcg: fix oops in mem_cgroup_shrink_usage
2008-08-06 14:15 [PATCH] memcg: fix oops in mem_cgroup_shrink_usage Hugh Dickins
@ 2008-08-06 16:13 ` kamezawa.hiroyu
2008-08-06 16:21 ` Balbir Singh
1 sibling, 0 replies; 3+ messages in thread
From: kamezawa.hiroyu @ 2008-08-06 16:13 UTC (permalink / raw)
To: Hugh Dickins; +Cc: Andrew Morton, KAMEZAWA Hiroyuki, Balbir Singh, linux-kernel
----- Original Message -----
>Date: Wed, 6 Aug 2008 15:15:08 +0100 (BST)
>From: Hugh Dickins <hugh@veritas.com>
>To: Andrew Morton <akpm@linux-foundation.org>
>cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
> Balbir Singh <balbir@linux.vnet.ibm.com>, linux-kernel@vger.kernel.org
>Subject: [PATCH] memcg: fix oops in mem_cgroup_shrink_usage
>
>
>Got an oops in mem_cgroup_shrink_usage() when testing loop over tmpfs:
>yes, of course, loop0 has no mm: other entry points check but this didn't.
>
>Signed-off-by: Hugh Dickins <hugh@veritas.com>
Ahh, thank you!
-Kame
>---
>
> mm/memcontrol.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>--- 2.6.27-rc2/mm/memcontrol.c 2008-08-06 08:36:20.000000000 +0100
>+++ linux/mm/memcontrol.c 2008-08-06 09:05:26.000000000 +0100
>@@ -796,6 +796,8 @@ int mem_cgroup_shrink_usage(struct mm_st
>
> if (mem_cgroup_subsys.disabled)
> return 0;
>+ if (!mm)
>+ return 0;
>
> rcu_read_lock();
> mem = mem_cgroup_from_task(rcu_dereference(mm->owner));
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] memcg: fix oops in mem_cgroup_shrink_usage
2008-08-06 14:15 [PATCH] memcg: fix oops in mem_cgroup_shrink_usage Hugh Dickins
2008-08-06 16:13 ` kamezawa.hiroyu
@ 2008-08-06 16:21 ` Balbir Singh
1 sibling, 0 replies; 3+ messages in thread
From: Balbir Singh @ 2008-08-06 16:21 UTC (permalink / raw)
To: Hugh Dickins; +Cc: Andrew Morton, KAMEZAWA Hiroyuki, linux-kernel
Hugh Dickins wrote:
> Got an oops in mem_cgroup_shrink_usage() when testing loop over tmpfs:
> yes, of course, loop0 has no mm: other entry points check but this didn't.
>
> Signed-off-by: Hugh Dickins <hugh@veritas.com>
> ---
>
> mm/memcontrol.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- 2.6.27-rc2/mm/memcontrol.c 2008-08-06 08:36:20.000000000 +0100
> +++ linux/mm/memcontrol.c 2008-08-06 09:05:26.000000000 +0100
> @@ -796,6 +796,8 @@ int mem_cgroup_shrink_usage(struct mm_st
>
> if (mem_cgroup_subsys.disabled)
> return 0;
> + if (!mm)
> + return 0;
>
> rcu_read_lock();
> mem = mem_cgroup_from_task(rcu_dereference(mm->owner));
Looks good
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-06 16:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06 14:15 [PATCH] memcg: fix oops in mem_cgroup_shrink_usage Hugh Dickins
2008-08-06 16:13 ` kamezawa.hiroyu
2008-08-06 16:21 ` Balbir Singh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox