Messages in this thread | | | Date | Mon, 30 Mar 2009 12:44:46 +0200 | From | Andi Kleen <> | 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
| |