Messages in this thread | ![/](/images/icornerl.gif) | | Date | Fri, 27 Mar 2009 15:34:35 +0100 | From | Oleg Nesterov <> | Subject | Re: [patch 3/14] x86, ptrace, bts: stop bts tracing early in do_exit |
| |
On 03/27, Markus Metzger wrote: > > +static void ptrace_bts_exit(void) > +{ > + if (unlikely(!list_empty(¤t->ptraced))) > + ptrace_bts_exit_tracer(); > + > + if (unlikely(current->bts)) > + ptrace_bts_exit_tracee(); > +}
Could you explain why do we need ptrace_bts_exit_tracee() ?
If current is traced, the tracer should do ptrace_bts_release() eventually, no?
And if we really need to do ptrace_bts_exit_tracee(), then "if (unlikely(current->bts))" check is racy. The tracer can do PTRACE_BTS_CONFIG right after the check.
Oleg.
| ![\](/images/icornerr.gif) |