alistair23-linux/arch/x86
Markus Metzger cac94f9793 x86, bts: fix race when bts tracer is removed
When the bts tracer is removed while the traced task is running,
the write to clear the bts tracer pointer races with context switch code.

Read the tracer once during a context switch.

When a new tracer is installed, the bts tracer is set in the ds context
before the tracer is initialized in order to claim the context for that
tracer.

This may result in write accesses using an uninitialized trace configuration
when scheduling timestamps have been requested.

Store active tracing flags separately and only set active flags after
the tracing configuration has been initialized.

Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144548.881338000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-04-07 13:36:10 +02:00
..
boot Merge branch 'dma-debug' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into x86/urgent 2009-04-03 16:35:09 +02:00
configs
crypto
ia32 preadv/pwritev: Add preadv and pwritev system calls. 2009-04-02 19:05:08 -07:00
include/asm Merge git://git.infradead.org/iommu-2.6 2009-04-06 14:26:05 -07:00
kernel x86, bts: fix race when bts tracer is removed 2009-04-07 13:36:10 +02:00
kvm Merge branch 'tracing/core-v2' into tracing-for-linus 2009-04-02 00:49:02 +02:00
lguest Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest-and-virtio 2009-03-30 17:57:39 -07:00
lib
math-emu Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
mm Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2009-04-05 11:16:25 -07:00
oprofile
pci x86, PAT: Remove duplicate memtype reserve in pci mmap 2009-04-03 14:43:29 -07:00
power x86: disable stack-protector for __restore_processor_state() 2009-04-03 19:48:41 +02:00
vdso
video
xen Merge branch 'linus' into cpumask-for-linus 2009-03-30 23:53:32 +02:00
Kconfig Merge git://git.infradead.org/iommu-2.6 2009-04-06 14:26:05 -07:00
Kconfig.cpu
Kconfig.debug Merge branch 'linus' into tracing/hw-branch-tracing 2009-04-07 13:34:42 +02:00
Makefile
Makefile_32.cpu