diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-09 22:25:28 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-02-21 20:20:09 +0100 |
commit | 57bba6a44244a9c7cef5951041bdd3f747b28ed0 (patch) | |
tree | d4588be249d956af2cd505e29b3f1698e440c179 | |
parent | 0fe4f5edc70f432565bfbc4bb10b1d7b2222fd48 (diff) | |
download | lwn-57bba6a44244a9c7cef5951041bdd3f747b28ed0.tar.gz lwn-57bba6a44244a9c7cef5951041bdd3f747b28ed0.zip |
oom: Add missing rcu protection of __task_cred() in dump_tasks
dump_tasks accesses __task_cred() without being in a RCU read side
critical section. tasklist_lock is not protecting that when
CONFIG_TREE_PREEMPT_RCU=y.
Add a rcu_read_lock/unlock() section around the code which accesses
__task_cred().
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
-rw-r--r-- | mm/oom_kill.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index f52481b1c1e5..c1fbaf5fc01f 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -349,7 +349,7 @@ static void dump_tasks(const struct mem_cgroup *mem) continue; } printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n", - p->pid, __task_cred(p)->uid, p->tgid, mm->total_vm, + p->pid, task_uid(p), p->tgid, mm->total_vm, get_mm_rss(mm), (int)task_cpu(p), p->signal->oom_adj, p->comm); task_unlock(p); |