From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>, Lin Ming <ming.m.lin@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Roland McGrath <roland@redhat.com>,
"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] ia64: ptrace_attach_sync_user_rbs: use ->sighand instead of ->signal to check the task is alive
Date: Wed, 4 Feb 2009 00:17:11 +0100 [thread overview]
Message-ID: <20090203231711.GA5020@redhat.com> (raw)
No functional changes.
It doesn't matter which pointer to check under tasklist to ensure the task
was not released, ->signal or ->sighand. But we are going to make ->signal
refcountable, change the code to use ->sighand.
Actually, this code doesn't need tasklist_lock and this check at all, it
should be converted to use lock_task_sighand().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
--- 6.29-rc3/arch/ia64/kernel/ptrace.c~1_IA64_PTRACE 2008-12-02 17:12:35.000000000 +0100
+++ 6.29-rc3/arch/ia64/kernel/ptrace.c 2009-02-03 23:55:41.000000000 +0100
@@ -640,7 +640,7 @@ ptrace_attach_sync_user_rbs (struct task
*/
read_lock(&tasklist_lock);
- if (child->signal) {
+ if (child->sighand) {
spin_lock_irq(&child->sighand->siglock);
if (child->state == TASK_STOPPED &&
!test_and_set_tsk_thread_flag(child, TIF_RESTORE_RSE)) {
@@ -664,7 +664,7 @@ ptrace_attach_sync_user_rbs (struct task
* job control stop, so that SIGCONT can be used to wake it up.
*/
read_lock(&tasklist_lock);
- if (child->signal) {
+ if (child->sighand) {
spin_lock_irq(&child->sighand->siglock);
if (child->state == TASK_TRACED &&
(child->signal->flags & SIGNAL_STOP_STOPPED)) {
next reply other threads:[~2009-02-03 23:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 23:17 Oleg Nesterov [this message]
2009-02-05 3:15 ` [PATCH 1/2] ia64: ptrace_attach_sync_user_rbs: use ->sighand instead of ->signal to check the task is alive Roland McGrath
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=20090203231711.GA5020@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=roland@redhat.com \
--cc=yanmin_zhang@linux.intel.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.