Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

KAMEZAWA Hiroyuki and committed by
Linus Torvalds
e638c139 c12ddba0

+1 -1
+1 -1
include/linux/memcontrol.h
··· 75 75 { 76 76 struct mem_cgroup *mem; 77 77 rcu_read_lock(); 78 - mem = mem_cgroup_from_task((mm)->owner); 78 + mem = mem_cgroup_from_task(rcu_dereference((mm)->owner)); 79 79 rcu_read_unlock(); 80 80 return cgroup == mem; 81 81 }