From 2c8d2b85e35d25daed7047219e0c341d34db53ee Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 9 Dec 2009 22:25:28 +0100 Subject: [PATCH] oom: Add missing rcu protection of __task_cred() in dump_tasks commit 57bba6a44244a9c7cef5951041bdd3f747b28ed0 in tip. 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 Cc: linux-mm@kvack.org Signed-off-by: Paul Gortmaker --- 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 b68e802..baa45f5 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -350,7 +350,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); -- 1.7.0.4