[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090327143435.GD14504@redhat.com>
Date: Fri, 27 Mar 2009 15:34:35 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Markus Metzger <markus.t.metzger@...el.com>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu, tglx@...utronix.de,
hpa@...or.com, markus.t.metzger@...il.com, roland@...hat.com,
eranian@...glemail.com, juan.villacis@...el.com,
ak@...ux.jf.intel.com
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.
--
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