From: "Luming Yu" <luming.yu@gmail.com>
To: Roland McGrath <roland@redhat.com>
Cc: Petr Tesarik <ptesarik@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
linux-ia64@vger.kernel.org
Subject: Re: [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race
Date: Tue, 27 May 2008 03:31:43 +0000 [thread overview]
Message-ID: <3877989d0805262031i29db16bcjfa31652afc746b49@mail.gmail.com> (raw)
In-Reply-To: <3877989d0805251830w70f19e4cu46fbc32148217749@mail.gmail.com>
>
> if happens, it should be a bug, right?
It does happen!!
Call Trace:
[<a000000100011bd0>] show_stack+0x50/0xa0
spà00000146bbfbb0 bspà00000146bb0e08
[<a000000100011c50>] dump_stack+0x30/0x60
spà00000146bbfd80 bspà00000146bb0de8
[<a0000001000979a0>] get_signal_to_deliver+0x60/0x6e0
spà00000146bbfd80 bspà00000146bb0d80
[<a0000001000343d0>] ia64_do_signal+0xb0/0xd00
spà00000146bbfd80 bspà00000146bb0cd8
[<a000000100012650>] do_notify_resume_user+0xf0/0x140
spà00000146bbfe20 bspà00000146bb0ca8
[<a00000010000aac0>] notify_resume_user+0x40/0x60
spà00000146bbfe20 bspà00000146bb0c58
[<a00000010000a9f0>] skip_rbs_switch+0xe0/0x110
spà00000146bbfe30 bspà00000146bb0c58
[<a000000000010740>] __kernel_syscall_via_break+0x0/0x20
spà00000146bc0000 bspà00000146bb0c58
>>
> I will try to customize kernel to capture call trace for a precise code path.
I applied the following patch , and got the call trace above..
If apply my RFC patch as antidote, I don't see "deliver" ...
Is the problem clear now? I will serve you until every thing is clear to you.
Thanks,
Luming
Signed-off-by: Yu Luming <luming.yu@intel.com>
diff -Bru 1/kernel/signal.c 0/kernel/signal.c
--- 1/kernel/signal.c 2008-05-27 15:18:48.000000000 +0800
+++ 0/kernel/signal.c 2008-05-27 15:08:51.000000000 +0800
@@ -38,6 +38,7 @@
*/
static struct kmem_cache *sigqueue_cachep;
+unsigned long global_arch_ptrace_stop_flag =0;
static int __sig_ignored(struct task_struct *t, int sig)
{
@@ -1501,9 +1502,12 @@
* siglock. That must prevent us from sleeping in TASK_TRACED.
* So after regaining the lock, we must check for SIGKILL.
*/
+ global_arch_ptrace_stop_flag = 1;
spin_unlock_irq(¤t->sighand->siglock);
arch_ptrace_stop(exit_code, info);
+
spin_lock_irq(¤t->sighand->siglock);
+ global_arch_ptrace_stop_flag = 0;
killed = sigkill_pending(current);
}
@@ -1701,6 +1705,8 @@
struct signal_struct *signal = current->signal;
int signr;
+ if (global_arch_ptrace_stop_flag)
+ dump_stack();
relock:
/*
* We'll jump back here after any time we were stopped in TASK_STOPPED.
next prev parent reply other threads:[~2008-05-27 3:31 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 2:47 [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-05-22 8:47 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-05-22 9:16 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-05-22 11:18 ` Roland McGrath
2008-05-22 12:12 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-05-22 20:39 ` Roland McGrath
2008-05-23 12:33 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-05-22 13:24 ` Luming Yu
2008-05-22 20:34 ` Roland McGrath
2008-05-23 3:42 ` Luming Yu
2008-05-23 4:19 ` Roland McGrath
2008-05-23 5:24 ` Luming Yu
2008-05-26 0:15 ` Roland McGrath
2008-05-26 1:30 ` Luming Yu
2008-05-27 3:31 ` Luming Yu [this message]
2008-05-27 4:04 ` Roland McGrath
2008-05-27 5:49 ` Luming Yu
2008-05-27 6:12 ` Roland McGrath
2008-05-27 6:25 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-06-03 6:04 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-06-03 9:01 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-06-03 14:32 ` Petr Tesarik
2008-06-03 21:01 ` Roland McGrath
2008-06-03 21:31 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luck, Tony
2008-06-03 22:13 ` Roland McGrath
2008-06-10 8:23 ` Luming Yu
2008-06-04 2:16 ` Luming Yu
2008-06-04 9:16 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-06-05 1:49 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-06-05 11:16 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-06-06 0:07 ` Roland McGrath
2008-09-09 3:06 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-09-10 5:55 ` Roland McGrath
2008-09-16 8:50 ` Luming Yu
2008-09-17 17:01 ` Roland McGrath
2008-09-18 5:44 ` Luming Yu
2008-05-27 6:34 ` Luming Yu
2008-05-27 8:48 ` Luming Yu
2008-05-28 9:14 ` Luming Yu
2008-06-03 6:02 ` Luming Yu
2008-05-30 8:05 ` 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=3877989d0805262031i29db16bcjfa31652afc746b49@mail.gmail.com \
--to=luming.yu@gmail.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ptesarik@suse.cz \
--cc=roland@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox