The patch titled oom: dump_tasks use find_lock_task_mm too fix has been added to the -mm tree. Its filename is oom-dump_tasks-use-find_lock_task_mm-too-dump_tasks-use-find_lock_task_mm-too-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: oom: dump_tasks use find_lock_task_mm too fix From: David Rientjes <rientjes@xxxxxxxxxx> When find_lock_task_mm() returns a thread other than p in dump_tasks(), its name should be displayed instead. This is the thread that will be targeted by the oom killer, not its mm-less parent. This also allows us to safely dereference task->comm without needing get_task_comm(). While we're here, remove the cast on task_cpu(task) as Andrew suggested. Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Cc: Balbir Singh <balbir@xxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/oom_kill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN mm/oom_kill.c~oom-dump_tasks-use-find_lock_task_mm-too-dump_tasks-use-find_lock_task_mm-too-fix mm/oom_kill.c --- a/mm/oom_kill.c~oom-dump_tasks-use-find_lock_task_mm-too-dump_tasks-use-find_lock_task_mm-too-fix +++ a/mm/oom_kill.c @@ -357,10 +357,10 @@ static void dump_tasks(const struct mem_ continue; } - printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n", + printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3u %3d %s\n", task->pid, __task_cred(task)->uid, task->tgid, task->mm->total_vm, get_mm_rss(task->mm), - (int)task_cpu(task), task->signal->oom_adj, p->comm); + task_cpu(task), task->signal->oom_adj, task->comm); task_unlock(task); } } _ Patches currently in -mm which might be from rientjes@xxxxxxxxxx are avr32-invoke-oom-killer-from-page-fault.patch oom-check-pf_kthread-instead-of-mm-to-skip-kthreads.patch oom-pf_exiting-check-should-take-mm-into-account.patch oom-introduce-find_lock_task_mm-to-fix-mm-false-positives.patch oom-dump_tasks-use-find_lock_task_mm-too.patch oom-improve-commentary-in-dump_tasks.patch oom-dump_tasks-use-find_lock_task_mm-too-dump_tasks-use-find_lock_task_mm-too-fix.patch oom-give-current-access-to-memory-reserves-if-it-has-been-killed.patch oom-avoid-sending-exiting-tasks-a-sigkill.patch oom-filter-tasks-not-sharing-the-same-cpuset.patch oom-sacrifice-child-with-highest-badness-score-for-parent.patch oom-sacrifice-child-with-highest-badness-score-for-parent-protect-dereferencing-of-tasks-comm.patch oom-sacrifice-child-with-highest-badness-score-for-parent-fix.patch oom-select-task-from-tasklist-for-mempolicy-ooms.patch oom-select-task-from-tasklist-for-mempolicy-ooms-add-has_intersects_mems_allowed-uma-variant.patch oom-select-task-from-tasklist-for-mempolicy-ooms-introduce-find_lock_task_mm-to-fix-mm-false-positives-fix.patch oom-enable-oom-tasklist-dump-by-default.patch oom-avoid-oom-killer-for-lowmem-allocations.patch oom-extract-panic-helper-function.patch oom-remove-special-handling-for-pagefault-ooms.patch oom-move-sysctl-declarations-to-oomh.patch oom-remove-unnecessary-code-and-cleanup.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html