mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUGFIX][PATCH]  memcg: use rcu_dereference to access mm->owner
@ 2009-04-13  6:43 KAMEZAWA Hiroyuki
  2009-04-14 16:04 ` Balbir Singh
  0 siblings, 1 reply; 2+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-04-13  6:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, balbir, nishimura, kosaki.motohiro

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;
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-14 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-13  6:43 [BUGFIX][PATCH] memcg: use rcu_dereference to access mm->owner KAMEZAWA Hiroyuki
2009-04-14 16:04 ` Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®