UPSTREAM: staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig

(cherry picked from commit 6bc2b856bb7c49f238914d965c0b1057ec78226e)

Set TIF_MEMDIE tsk_thread flag before send kill signal to the
selected thread. This is to fit a usual code sequence and avoid
potential race issue.

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 76fc4536faaac9644151fb8a38731c8cf4ab85c4
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This commit is contained in:
Weijie Yang 2014-02-14 14:03:56 +08:00 committed by syphyr
parent 34c16131f5
commit cffd694b3f
1 changed files with 1 additions and 1 deletions

View File

@ -442,8 +442,8 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
}
lowmem_deathpending_timeout = jiffies + HZ;
send_sig(SIGKILL, selected, 0);
set_tsk_thread_flag(selected, TIF_MEMDIE);
send_sig(SIGKILL, selected, 0);
rem -= selected_tasksize;
if(reclaim_state)
reclaim_state->reclaimed_slab = selected_tasksize;