staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig
PATCH 1/1 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 <[email protected]>
--- drivers/staging/android/lowmemorykiller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 drivers/staging/android/lowmemorykiller.c
drivers/staging/android/lowmemorykiller.c +1 -1
@@ -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; }
Signature · 1 line
1.7.10.4
Quoted 4 lines · Weijie Yang
Set
TIF_MEMDIEtsk_threadflag before send kill signal to the selected thread. This is to fit a usual code sequence and avoid potential race issue.
Ok!
Quoted 6 lines
Signed-off-by Weijie Yang <[email protected]>--- drivers/staging/android/lowmemorykiller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 drivers/staging/android/lowmemorykiller.c
That's bad, we'll want to keep this file with permissions of 0644.
Quoted 9 lines · David Rientjes
Quoted 4 lines · Weijie Yang
Set
TIF_MEMDIEtsk_threadflag before send kill signal to the selected thread. This is to fit a usual code sequence and avoid potential race issue.Ok!
Quoted 8 lines
Quoted 6 lines
Signed-off-by Weijie Yang <[email protected]>--- drivers/staging/android/lowmemorykiller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 drivers/staging/android/lowmemorykiller.cThat's bad, we'll want to keep this file with permissions of 0644.
I will remove this annoying mode change, and resend this patch.
Thanks!