All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig
@ 2014-02-14  6:03 Weijie Yang
  2014-02-14 10:26 ` David Rientjes
  0 siblings, 1 reply; 2+ messages in thread
From: Weijie Yang @ 2014-02-14  6:03 UTC (permalink / raw)
  To: gregkh; +Cc: anton.vorontsov, rientjes, weijie.yang.kh, 'linux-kernel'

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>
---
 drivers/staging/android/lowmemorykiller.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 6f094b3..4bcf00a
--- 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;
 	}
 
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig
  2014-02-14  6:03 [PATCH RESEND] staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig Weijie Yang
@ 2014-02-14 10:26 ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2014-02-14 10:26 UTC (permalink / raw)
  To: Weijie Yang; +Cc: gregkh, anton.vorontsov, weijie.yang.kh, linux-kernel

On Fri, 14 Feb 2014, Weijie Yang wrote:

> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-14 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14  6:03 [PATCH RESEND] staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig Weijie Yang
2014-02-14 10:26 ` David Rientjes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.