diff options
author | Oleg Nesterov <oleg@redhat.com> | 2011-07-30 16:35:02 +0200 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-10-28 11:16:14 +0200 |
commit | a9df8707120c531a295772af9cb97edb1e4dbc7e (patch) | |
tree | b74d7de41361504bc3736a9cb2ae49033ad45309 /Documentation/sgi-ioc4.txt | |
parent | fc17abbe85db10f0324951048894cddcf1bdb72d (diff) |
oom: task->mm == NULL doesn't mean the memory was freed
commit c027a474a68065391c8773f6e83ed5412657e369 upstream.
exit_mm() sets ->mm == NULL then it does mmput()->exit_mmap() which
frees the memory.
However select_bad_process() checks ->mm != NULL before TIF_MEMDIE,
so it continues to kill other tasks even if we have the oom-killed
task freeing its memory.
Change select_bad_process() to check ->mm after TIF_MEMDIE, but skip
the tasks which have already passed exit_notify() to ensure a zombie
with TIF_MEMDIE set can't block oom-killer. Alternatively we could
probably clear TIF_MEMDIE after exit_mmap().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Change-Id: I75bcabc693de712a8747aed3a3ce05f358ed83b9
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35672
Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'Documentation/sgi-ioc4.txt')
0 files changed, 0 insertions, 0 deletions