mm, oom: show process exiting information in __oom_kill_process()
authorYafang Shao <laoar.shao@gmail.com>
Wed, 12 Aug 2020 01:31:32 +0000 (18:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Aug 2020 17:57:56 +0000 (10:57 -0700)
commit619b5b469bcab84ea3bee1d8d04451c781d23feb
tree194a09ba036cd452f3e1bd34f67edf1dbedb58cc
parentb1aa7c9377bdff904efa0fbde1f96e1769730d8a
mm, oom: show process exiting information in __oom_kill_process()

When the OOM killer finds a victim and tryies to kill it, if the victim is
already exiting, the task mm will be NULL and no process will be killed.
But the dump_header() has been already executed, so it will be strange to
dump so much information without killing a process.  We'd better show some
helpful information to indicate why this happens.

Suggested-by: David Rientjes <rientjes@google.com>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Qian Cai <cai@lca.pw>
Link: http://lkml.kernel.org/r/20200721010127.17238-1-laoar.shao@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/oom_kill.c