linux/kernel/time
Thomas Gleixner d0981a1b21 clocksource: Protect the watchdog rating changes with clocksource_mutex
Martin pointed out that commit 6ea41d2529 (clocksource: Call
clocksource_change_rating() outside of watchdog_lock) has a
theoretical reference count problem. The calls to
clocksource_change_rating() are now done outside of the clocksource
mutex and outside of the watchdog lock. A concurrent
clocksource_unregister() could remove the clock.

Split out the code which changes the rating from
clocksource_change_rating() into __clocksource_change_rating().

Protect the clocksource_watchdog_work() code sequence with the
clocksource_mutex() and call __clocksource_change_rating().

LKML-Reference: <alpine.LFD.2.00.0908171038420.2782@localhost.localdomain>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-08-19 11:42:48 +02:00
..
clockevents.c hrtimer: Fix migration expiry check 2009-07-10 17:32:55 +02:00
clocksource.c clocksource: Protect the watchdog rating changes with clocksource_mutex 2009-08-19 11:42:48 +02:00
jiffies.c clocksource: Cleanup clocksource selection 2009-08-15 10:55:46 +02:00
Kconfig Kconfig: eliminate "def_bool n" constructs 2008-10-16 11:21:31 -07:00
Makefile timecompare: generic infrastructure to map between two time bases 2009-02-15 22:43:32 -08:00
ntp.c timekeeping: Introduce timekeeping_leap_insert 2009-08-15 10:55:45 +02:00
tick-broadcast.c clockevents: tick_broadcast_device can become static 2009-05-02 10:31:14 +02:00
tick-common.c clockevents: prevent endless loop in tick_handle_periodic() 2009-05-02 10:22:27 +02:00
tick-internal.h NOHZ: restart tick device from irq_enter() 2008-10-17 18:13:38 +02:00
tick-oneshot.c clocksource: prevent selection of low resolution clocksourse also for nohz=on 2009-06-13 12:00:26 +02:00
tick-sched.c Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-20 10:51:44 -07:00
timecompare.c timecompare: generic infrastructure to map between two time bases 2009-02-15 22:43:32 -08:00
timekeeping.c timekeeping: Introduce read_boot_clock 2009-08-15 10:55:47 +02:00
timer_list.c Merge branch 'timers/range-hrtimers' into v28-range-hrtimers-for-linus-v2 2008-10-22 09:48:06 +02:00
timer_stats.c timer stats: Optimize by adding quick check to avoid function calls 2009-06-24 11:15:09 +02:00