diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-01-05 14:22:08 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-05 14:22:10 +0100 |
commit | aef1b9cef78ae65c6501850851cc3f61f9be477b (patch) | |
tree | 9769972983e84620df17c13b73f70a8341c4b125 /mm | |
parent | 20c457b8587bee4644d998331d9e13be82e05b4c (diff) | |
parent | 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff) | |
download | linux-3.10-aef1b9cef78ae65c6501850851cc3f61f9be477b.tar.gz linux-3.10-aef1b9cef78ae65c6501850851cc3f61f9be477b.tar.bz2 linux-3.10-aef1b9cef78ae65c6501850851cc3f61f9be477b.zip |
Merge commit 'v2.6.37' into perf/core
Merge reason: Add the final .37 tree.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7a22b412921..00bb8a64d02 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1925,19 +1925,18 @@ again: rcu_read_lock(); p = rcu_dereference(mm->owner); - VM_BUG_ON(!p); /* - * because we don't have task_lock(), "p" can exit while - * we're here. In that case, "mem" can point to root - * cgroup but never be NULL. (and task_struct itself is freed - * by RCU, cgroup itself is RCU safe.) Then, we have small - * risk here to get wrong cgroup. But such kind of mis-account - * by race always happens because we don't have cgroup_mutex(). - * It's overkill and we allow that small race, here. + * Because we don't have task_lock(), "p" can exit. + * In that case, "mem" can point to root or p can be NULL with + * race with swapoff. Then, we have small risk of mis-accouning. + * But such kind of mis-account by race always happens because + * we don't have cgroup_mutex(). It's overkill and we allo that + * small race, here. + * (*) swapoff at el will charge against mm-struct not against + * task-struct. So, mm->owner can be NULL. */ mem = mem_cgroup_from_task(p); - VM_BUG_ON(!mem); - if (mem_cgroup_is_root(mem)) { + if (!mem || mem_cgroup_is_root(mem)) { rcu_read_unlock(); goto done; } |