aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2010-01-26 12:51:10 +0100
committerThomas Gleixner <[email protected]>2010-01-26 14:53:16 +0100
commit7b7422a566aa0dc1e582ce263d4c7ff4a772700a (patch)
tree29cb2554e08df65a82afd46f2e034ee0e015ac80 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parent9a3cbe3265c7714e8ee423feb6e27a080af79608 (diff)
clocksource: Prevent potential kgdb dead lock
commit 0f8e8ef7 (clocksource: Simplify clocksource watchdog resume logic) introduced a potential kgdb dead lock. When the kernel is stopped by kgdb inside code which holds watchdog_lock then kgdb dead locks in clocksource_resume_watchdog(). clocksource_resume_watchdog() is called from kbdg via clocksource_touch_watchdog() to avoid that the clock source watchdog marks TSC unstable after the kernel has been stopped. Solve this by replacing spin_lock with a spin_trylock and just return in case the lock is held. Not resetting the watchdog might result in TSC becoming marked unstable, but that's an acceptable penalty for using kgdb. The timekeeping is anyway easily screwed up by kgdb when the system uses either jiffies or a clock source which wraps in short intervals (e.g. pm_timer wraps about every 4.6s), so we really do not have to worry about that occasional TSC marked unstable side effect. The second caller of clocksource_resume_watchdog() is clocksource_resume(). The trylock is safe here as well because the system is UP at this point, interrupts are disabled and nothing else can hold watchdog_lock(). Reported-by: Jason Wessel <[email protected]> LKML-Reference: <[email protected]> Cc: [email protected] Cc: Martin Schwidefsky <[email protected]> Cc: John Stultz <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions