lkml.org 
[lkml]   [2009]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 13 Apr 2009 15:43:43 +0900
FromKAMEZAWA Hiroyuki <>
Subject[BUGFIX][PATCH] memcg: use rcu_dereference to access mm->owner
the patch itself is against mmotm-Apr11.
Maybe it's better to apply 2.6.30-rc series.
==
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

mm->owner should be accessed with rcu_dereference().

Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
include/linux/memcontrol.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mmotm-2.6.30-Apr11/include/linux/memcontrol.h
===================================================================
--- mmotm-2.6.30-Apr11.orig/include/linux/memcontrol.h
+++ mmotm-2.6.30-Apr11/include/linux/memcontrol.h
@@ -75,7 +75,7 @@ int mm_match_cgroup(const struct mm_stru
{
struct mem_cgroup *mem;
rcu_read_lock();
- mem = mem_cgroup_from_task((mm)->owner);
+ mem = mem_cgroup_from_task(rcu_dereference((mm)->owner));
rcu_read_unlock();
return cgroup == mem;
}


\
 
 \ /
  Last update: 2009-04-13 08:47    [from the cache]
©2003-2010