]> git.baikalelectronics.ru Git - kernel.git/commit
oom: dump_tasks use find_lock_task_mm too fix
authorDavid Rientjes <rientjes@google.com>
Tue, 10 Aug 2010 00:18:47 +0000 (17:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Aug 2010 03:44:56 +0000 (20:44 -0700)
commit1fcceb9e45cae863c33d25bcc418bccc66437c8e
tree2f2577d6813d0472b23359bcda8223edf0d7b396
parent2d45d8c163b5d51363d94c9773eaad574b427ed5
oom: dump_tasks use find_lock_task_mm too fix

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@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/oom_kill.c