summaryrefslogtreecommitdiff
path: root/drivers/staging/android
diff options
context:
space:
mode:
authorWeijie Yang <weijie.yang@samsung.com>2014-02-14 14:03:56 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-14 09:18:39 -0800
commit6bc2b856bb7c49f238914d965c0b1057ec78226e (patch)
tree0be82e27070b29827395d5a5e6aefab5c1646be5 /drivers/staging/android
parent52cf6acfb0a81267848701ad385ec735c0bd61b2 (diff)
staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig
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>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r--drivers/staging/android/lowmemorykiller.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 6f094b37f1f1..4bcf00a87270 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -159,8 +159,8 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc)
selected->pid, selected->comm,
selected_oom_score_adj, selected_tasksize);
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;
}