From: Weijie Yang <weijie.yang@samsung.com>
To: gregkh@linuxfoundation.org
Cc: anton.vorontsov@linaro.org, rientjes@google.com,
weijie.yang.kh@gmail.com,
"'linux-kernel'" <linux-kernel@vger.kernel.org>
Subject: [PATCH RESEND] staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig
Date: Fri, 14 Feb 2014 14:03:56 +0800 [thread overview]
Message-ID: <000001cf294a$b1bebd60$153c3820$%yang@samsung.com> (raw)
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
next reply other threads:[~2014-02-14 6:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 6:03 Weijie Yang [this message]
2014-02-14 10:26 ` [PATCH RESEND] staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001cf294a$b1bebd60$153c3820$%yang@samsung.com' \
--to=weijie.yang@samsung.com \
--cc=anton.vorontsov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
--cc=weijie.yang.kh@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.