Re: [patch 3/14] x86, ptrace, bts: stop bts tracing early indo_exit
From: Oleg Nesterov
Date: Fri Mar 27 2009 - 10:38:22 EST
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/