]> git.karo-electronics.de Git - linux-beck.git/commit
KVM guest: prevent tracing recursion with kvmclock
authorAvi Kivity <avi@redhat.com>
Tue, 15 Nov 2011 12:59:07 +0000 (14:59 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 20 Nov 2011 08:53:48 +0000 (10:53 +0200)
commit95ef1e52922cf75b1ea2eae54ef886f2cc47eecb
tree158082c19666aa589b539f20b4cf29e99f205f4f
parentbb75c627fb0dfb8c0ab75d3033709ff928896e16
KVM guest: prevent tracing recursion with kvmclock

Prevent tracing of preempt_disable() in get_cpu_var() in
kvm_clock_read(). When CONFIG_DEBUG_PREEMPT is enabled,
preempt_disable/enable() are traced and this causes the function_graph
tracer to go into an infinite recursion. By open coding the
preempt_disable() around the get_cpu_var(), we can use the notrace
version which prevents preempt_disable/enable() from being traced and
prevents the recursion.

Based on a similar patch for Xen from Jeremy Fitzhardinge.

Tested-by: Gleb Natapov <gleb@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kernel/kvmclock.c