summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2009-04-21 12:24:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-21 13:41:48 -0700
commite638c1394010859a015a3b533ee452d768e62cea (patch)
treeb8db247c01e86835afe6b0d6cd897543e76c23d0 /include
parentc12ddba09394c60e1120e6997794fa6ed52da884 (diff)
downloadop-kernel-dev-e638c1394010859a015a3b533ee452d768e62cea.zip
op-kernel-dev-e638c1394010859a015a3b533ee452d768e62cea.tar.gz
memcg: use rcu_dereference to access mm->owner
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> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/memcontrol.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 18146c9..a9e3b76 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -75,7 +75,7 @@ int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup)
{
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;
}
OpenPOWER on IntegriCloud