lkml.org 
[lkml]   [2008]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memcg: fix oops in mem_cgroup_shrink_usage
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


\
 
 \ /
  Last update: 2008-08-06 18:25    [W:0.274 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site