lkml.org 
[lkml]   [2009]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-03-30 12:47    [W:0.168 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site