From: Stephane Eranian <eranian@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: perfmon broken
Date: Wed, 29 Sep 2004 09:42:33 +0000 [thread overview]
Message-ID: <20040929094233.GC9707@frankl.hpl.hp.com> (raw)
In-Reply-To: <1096412318.14161.51.camel@tdi>
Alex,
Yes, your patch will likely fix the problem. I need to check
to see if we need to keep TASK_STOPPED.
Thanks.
On Tue, Sep 28, 2004 at 04:58:38PM -0600, Alex Williamson wrote:
>
> Looks like this changeset back between 2.6.9-rc1-bk15 & bk16 broke
> perfmon:
>
> http://linux.bkbits.net:8080/linux-2.5/cset@413f1bdabfaQNzIZpU6bPxNlSxdriQ
>
> [PATCH] cleanup ptrace stops and remove notify_parent
>
> This adds a new state TASK_TRACED that is used in place of
> TASK_STOPPED when a thread stops because it is ptraced. Now
> ptrace operations are only permitted when the target is in
> TASK_TRACED state, not in TASK_STOPPED.
> ...
>
> Here's the simple fix, perhaps Stephane has a better approach. Thanks,
>
> Alex
>
> --
> Signed-off-by: Alex Williamson <alex.williamson@hp.com>
>
>
> === arch/ia64/kernel/perfmon.c 1.90 vs edited ==> --- 1.90/arch/ia64/kernel/perfmon.c 2004-09-03 08:54:08 -06:00
> +++ edited/arch/ia64/kernel/perfmon.c 2004-09-28 16:42:05 -06:00
> @@ -2601,7 +2601,7 @@
> */
> if (task = current) return 0;
>
> - if (task->state != TASK_STOPPED) {
> + if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)){
> DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task->pid, task->state));
> return -EBUSY;
> }
> @@ -4755,7 +4755,8 @@
> * the task must be stopped.
> */
> if (PFM_CMD_STOPPED(cmd)) {
> - if (task->state != TASK_STOPPED) {
> + if ((task->state != TASK_STOPPED) &&
> + (task->state != TASK_TRACED)) {
> DPRINT(("[%d] task not in stopped state\n", task->pid));
> return -EBUSY;
> }
>
--
-Stephane
prev parent reply other threads:[~2004-09-29 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-28 22:58 perfmon broken Alex Williamson
2004-09-29 9:42 ` Stephane Eranian [this message]
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=20040929094233.GC9707@frankl.hpl.hp.com \
--to=eranian@hpl.hp.com \
--cc=linux-ia64@vger.kernel.org \
/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