From: Oleg Nesterov Date: Tue, 10 Aug 2010 00:18:44 +0000 (-0700) Subject: oom: PF_EXITING check should take mm into account X-Git-Tag: v2.6.36-rc1~466 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b52279406e77be711c068f9a8e970ea6471e089c;p=pandora-kernel.git oom: PF_EXITING check should take mm into account select_bad_process() checks PF_EXITING to detect the task which is going to release its memory, but the logic is very wrong. - a single process P with the dead group leader disables select_bad_process() completely, it will always return ERR_PTR() while P can live forever - if the PF_EXITING task has already released its ->mm it doesn't make sense to expect it is goiing to free more memory (except task_struct/etc) Change the code to ignore the PF_EXITING tasks without ->mm. Signed-off-by: Oleg Nesterov Signed-off-by: David Rientjes Cc: Balbir Singh Acked-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed