aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bitmap.c
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2011-07-30 14:35:02 +0000
committerLinus Torvalds <[email protected]>2011-08-02 01:24:12 +0000
commitc027a474a68065391c8773f6e83ed5412657e369 (patch)
tree6d3c8caba5ebf736c3f9ef3cacb708cbdb9869c2 /lib/bitmap.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg... (diff)
downloadkernel-c027a474a68065391c8773f6e83ed5412657e369.tar.gz
kernel-c027a474a68065391c8773f6e83ed5412657e369.zip
oom: task->mm == NULL doesn't mean the memory was freed
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 <[email protected]> Reviewed-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/bitmap.c')
0 files changed, 0 insertions, 0 deletions