From: Oleg Nesterov <oleg@redhat.com>
To: Markus Metzger <markus.t.metzger@intel.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, tglx@linutronix.de,
hpa@zytor.com, markus.t.metzger@gmail.com, roland@redhat.com,
eranian@googlemail.com, juan.villacis@intel.com,
ak@linux.jf.intel.com
Subject: Re: [patch 3/14] x86, ptrace, bts: stop bts tracing early in do_exit
Date: Fri, 27 Mar 2009 15:34:35 +0100 [thread overview]
Message-ID: <20090327143435.GD14504@redhat.com> (raw)
In-Reply-To: <20090327095525.A11052@sedona.ch.intel.com>
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.
next prev parent reply other threads:[~2009-03-27 14:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 8:55 [patch 3/14] x86, ptrace, bts: stop bts tracing early in do_exit Markus Metzger
2009-03-27 14:34 ` Oleg Nesterov [this message]
2009-03-27 15:34 ` Metzger, Markus T
2009-03-27 17:24 ` Oleg Nesterov
2009-03-27 19:25 ` Markus Metzger
2009-03-28 11:31 ` Markus Metzger
2009-03-30 1:22 ` Oleg Nesterov
2009-03-30 6:55 ` Metzger, Markus T
2009-03-30 10:44 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090327143435.GD14504@redhat.com \
--to=oleg@redhat.com \
--cc=ak@linux.jf.intel.com \
--cc=eranian@googlemail.com \
--cc=hpa@zytor.com \
--cc=juan.villacis@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.t.metzger@gmail.com \
--cc=markus.t.metzger@intel.com \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.