projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c12ddba
)
memcg: use rcu_dereference to access mm->owner
author
KAMEZAWA Hiroyuki
<
[email protected]
>
Tue, 21 Apr 2009 19:24:41 +0000
(12:24 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 21 Apr 2009 20:41:48 +0000
(13:41 -0700)
mm->owner should be accessed with rcu_dereference().
Reported-by: KOSAKI Motohiro <
[email protected]
>
Signed-off-by: KAMEZAWA Hiroyuki <
[email protected]
>
Acked-by: Balbir Singh <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
include/linux/memcontrol.h
patch
|
blob
|
history
diff --git
a/include/linux/memcontrol.h
b/include/linux/memcontrol.h
index 18146c980b68b33d5aafdd8403531f5548dd545a..a9e3b76aa8846d2b6172cfca09a15d6c0d2b4d83 100644
(file)
--- 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;
}