https://github.com/torvalds/linux
Revision 747388d78a0ae768fd82b55c4ed38aa646a72364 authored by KAMEZAWA Hiroyuki on 11 May 2010, 21:06:59 UTC, committed by Linus Torvalds on 12 May 2010, 00:33:42 UTC
Some callers (in memcontrol.c) calls css_is_ancestor() without
rcu_read_lock.  Because css_is_ancestor() has to access RCU protected
data, it should be under rcu_read_lock().

This makes css_is_ancestor() itself does safe access to RCU protected
area.  (At least, "root" can have refcnt==0 if it's not an ancestor of
"child".  So, we need rcu_read_lock().)

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: 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>
1 parent 7f0f154
History
Tip revision: 747388d78a0ae768fd82b55c4ed38aa646a72364 authored by KAMEZAWA Hiroyuki on 11 May 2010, 21:06:59 UTC
memcg: fix css_is_ancestor() RCU locking
Tip revision: 747388d
File Mode Size
Makefile -rw-r--r-- 4.3 KB
builddeb -rw-r--r-- 5.7 KB
buildtar -rw-r--r-- 2.7 KB
mkspec -rwxr-xr-x 2.8 KB

back to top