All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
	Markus Metzger <markus.t.metzger@googlemail.com>,
	Ingo Molnar <mingo@elte.hu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"roland@redhat.com" <roland@redhat.com>,
	"eranian@googlemail.com" <eranian@googlemail.com>,
	"Villacis, Juan" <juan.villacis@intel.com>,
	"ak@linux.jf.intel.com" <ak@linux.jf.intel.com>
Subject: Re: [patch 3/14] x86, ptrace, bts: stop bts tracing early in	do_exit
Date: Mon, 30 Mar 2009 12:44:46 +0200	[thread overview]
Message-ID: <49D0A29E.2040406@linux.intel.com> (raw)
In-Reply-To: <928CFBE8E7CB0040959E56B4EA41A77E9266B8A9@irsmsx504.ger.corp.intel.com>


> 
>>> ds_release_bts(struct bts_tracer *tracer)
>>> {
>>> 	struct task_struct *task =
>>> 		tracer->ds.context->task;
>>>
>>> 	do {
>>> 		set_task_state(task, TASK_UNINTERRUPTIBLE);
>> Oh, this is not right,
> 
> Agreed.
> 
> I wonder if it is ever safe to change another task's state.
> There's a lot of code that sets the task state seemingly
> unprotected - but always for current.

It should be safe when you can guarantee that the other task is stopped
(as in ptrace) and you protect against yourself (only a single
external writer)

-Andi

      reply	other threads:[~2009-03-30 10:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27  8:55 [patch 3/14] x86, ptrace, bts: stop bts tracing early in do_exit Markus Metzger
2009-03-27 14:34 ` Oleg Nesterov
2009-03-27 15:34   ` Metzger, Markus T
2009-03-27 17:24     ` Oleg Nesterov
2009-03-27 19:25       ` Markus Metzger
2009-03-28 11:31       ` Markus Metzger
2009-03-30  1:22         ` Oleg Nesterov
2009-03-30  6:55           ` Metzger, Markus T
2009-03-30 10:44             ` Andi Kleen [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=49D0A29E.2040406@linux.intel.com \
    --to=ak@linux.intel.com \
    --cc=ak@linux.jf.intel.com \
    --cc=eranian@googlemail.com \
    --cc=hpa@zytor.com \
    --cc=juan.villacis@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.t.metzger@googlemail.com \
    --cc=markus.t.metzger@intel.com \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.com \
    --cc=tglx@linutronix.de \
    /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.