[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49D0A29E.2040406@linux.intel.com>
Date: Mon, 30 Mar 2009 12:44:46 +0200
From: Andi Kleen <ak@...ux.intel.com>
To: "Metzger, Markus T" <markus.t.metzger@...el.com>
CC: Oleg Nesterov <oleg@...hat.com>,
Markus Metzger <markus.t.metzger@...glemail.com>,
Ingo Molnar <mingo@...e.hu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"hpa@...or.com" <hpa@...or.com>,
"roland@...hat.com" <roland@...hat.com>,
"eranian@...glemail.com" <eranian@...glemail.com>,
"Villacis, Juan" <juan.villacis@...el.com>,
"ak@...ux.jf.intel.com" <ak@...ux.jf.intel.com>
Subject: Re: [patch 3/14] x86, ptrace, bts: stop bts tracing early in do_exit
>
>>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists