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

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(-)
 mode change 100644 => 100755 drivers/staging/android/lowmemorykiller.c

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
old mode 100644
new mode 100755
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	[flat|nested] 3+ messages in thread

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

On Thu, 13 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.
> 

Ok!

> Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
> ---
>  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.

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

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

On Thu, Feb 13, 2014 at 4:00 PM, David Rientjes <rientjes@google.com> wrote:
> On Thu, 13 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.
>>
>
> Ok!
>
>> Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
>> ---
>>  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.

I will remove this annoying mode change, and resend this patch.

Thanks!

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

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

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®