aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-10-31 13:08:28 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-04 17:14:04 +0100
commit07695fa04e8a3384b0c855398ce1f7885bd7dc3b (patch)
tree5a70702087ea1f603b69281aaa270b117f37a63f /virt
parent71566a0d161edec70361b7f90f6e54af6a6d5d05 (diff)
tracing/ftrace: fix a race condition in sched_switch tracer
Impact: fix race condition in sched_switch tracer This patch fixes a race condition in the sched_switch tracer. If several tasks (IE: concurrent initcalls) are playing with tracing_start_cmdline_record() and tracing_stop_cmdline_record(), the following situation could happen: _ Task A and B are using the same tracepoint probe. Task A holds it. Task B is sleeping and doesn't hold it. _ Task A frees the sched tracer, then sched_ref is decremented to 0. _ Task A is preempted and hadn't yet unregistered its tracepoint probe, then B runs. _ B increments sched_ref, sees it's 1 and then guess it has to register its probe. But it has not been freed by task A. _ A lot of bad things can happen after that... Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions