memcg: css_id() must be called under rcu_read_lock()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 23 Apr 2010 19:26:38 +0000 (12:26 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 4 May 2010 16:25:03 +0000 (09:25 -0700)
commitad4ba375373937817404fd92239ef4cadbded23b
tree1c59ebd7a1e3ace3539396dd35ecff0f06132fe8
parent1ce7e4ff24fe338438bc7837e02780f202bf202b
memcg: css_id() must be called under rcu_read_lock()

This patch fixes task_in_mem_cgroup(), mem_cgroup_uncharge_swapcache(),
mem_cgroup_move_swap_account(), and is_target_pte_for_mc() to protect
calls to css_id().  An additional RCU lockdep splat was reported for
memcg_oom_wake_function(), however, this function is not yet in
mainline as of 2.6.34-rc5.

Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c