]> rtime.felk.cvut.cz Git - linux-imx.git/commit
xen: use non-tracing preempt in xen_clocksource_read()
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 24 Aug 2011 16:54:24 +0000 (09:54 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 24 Aug 2011 16:54:24 +0000 (09:54 -0700)
commitf1c39625d63c9f8eba8f036429c10a9cb9e32920
tree8ca13e0d5f9c0db22f9933c07a170d865a582fe3
parentfcb8ce5cfe30ca9ca5c9a79cdfe26d1993e65e0c
xen: use non-tracing preempt in xen_clocksource_read()

The tracing code used sched_clock() to get tracing timestamps, which
ends up calling xen_clocksource_read().  xen_clocksource_read() must
disable preemption, but if preemption tracing is enabled, this results
in infinite recursion.

I've only noticed this when boot-time tracing tests are enabled, but it
seems like a generic bug.  It looks like it would also affect
kvm_clocksource_read().

Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/xen/time.c