aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-01-06 04:27:34 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-01-06 04:27:34 -0500
commit1928e87bcf185f56008d0746f887b691c1cb8c4a (patch)
treebc8db9e9cb40b73742d05e2e68189bd647687249 /mm/memcontrol.c
parentca9c20ce2b383032b71bdae9ec0b468d428ca8d4 (diff)
parent3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/video/sh_mobile_lcdcfb.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 7a22b4129211..00bb8a64d028 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1925,19 +1925,18 @@ again:
1925 1925
1926 rcu_read_lock(); 1926 rcu_read_lock();
1927 p = rcu_dereference(mm->owner); 1927 p = rcu_dereference(mm->owner);
1928 VM_BUG_ON(!p);
1929 /* 1928 /*
1930 * because we don't have task_lock(), "p" can exit while 1929 * Because we don't have task_lock(), "p" can exit.
1931 * we're here. In that case, "mem" can point to root 1930 * In that case, "mem" can point to root or p can be NULL with
1932 * cgroup but never be NULL. (and task_struct itself is freed 1931 * race with swapoff. Then, we have small risk of mis-accouning.
1933 * by RCU, cgroup itself is RCU safe.) Then, we have small 1932 * But such kind of mis-account by race always happens because
1934 * risk here to get wrong cgroup. But such kind of mis-account 1933 * we don't have cgroup_mutex(). It's overkill and we allo that
1935 * by race always happens because we don't have cgroup_mutex(). 1934 * small race, here.
1936 * It's overkill and we allow that small race, here. 1935 * (*) swapoff at el will charge against mm-struct not against
1936 * task-struct. So, mm->owner can be NULL.
1937 */ 1937 */
1938 mem = mem_cgroup_from_task(p); 1938 mem = mem_cgroup_from_task(p);
1939 VM_BUG_ON(!mem); 1939 if (!mem || mem_cgroup_is_root(mem)) {
1940 if (mem_cgroup_is_root(mem)) {
1941 rcu_read_unlock(); 1940 rcu_read_unlock();
1942 goto done; 1941 goto done;
1943 } 1942 }