From: David Rientjes Date: Tue, 28 Apr 2015 22:50:46 +0000 (-0700) Subject: android, lmk: avoid setting TIF_MEMDIE if process has already exited X-Git-Tag: omap-for-v4.2/fixes-rc1^2~92^2~633 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1099a69a6244baa7d24ce52627bab253a3b52ac;p=pandora-kernel.git android, lmk: avoid setting TIF_MEMDIE if process has already exited TIF_MEMDIE should not be set on a process if it does not have a valid ->mm, and this is protected by task_lock(). If TIF_MEMDIE gets set after the mm has detached, and the process fails to exit, then the oom killer will defer forever waiting for it to exit. Make sure that the mm is still valid before setting TIF_MEMDIE by way of mark_tsk_oom_victim(). Cc: "Arve Hjønnevåg" Cc: Riley Andrews Acked-by: Michal Hocko Signed-off-by: David Rientjes Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed