]> git.baikalelectronics.ru Git - kernel.git/commit
x86, bts: fix race between per-task and per-cpu branch tracing
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 3 Apr 2009 14:43:37 +0000 (16:43 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 7 Apr 2009 11:36:16 +0000 (13:36 +0200)
commit56992a7a31038b30d69ccce9b5d1c28368b52237
tree2a9fba8e7abfece1378e14472650e2e1cfb9403e
parent7791d20d4395581df74f305c63b71a5b5bbacf8f
x86, bts: fix race between per-task and per-cpu branch tracing

Per-task branch tracing installs a debug store context with the traced
task. This immediately results in the branch trace control bits to be
cleared for the next context switch of that task, if not set before.

Either per-cpu or per-task tracing are allowed at the same time.

An active per-cpu tracing would be disabled even if the per-task tracing
request is rejected and the task debug store context removed.

Check the tracing type (per-cpu or per-task) before installing a task
debug store context.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144552.856000000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/ds.c