diff options
author | john stultz <johnstul@us.ibm.com> | 2009-01-22 00:53:22 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-06-11 05:24:52 -0400 |
commit | 3f68535adad8dd89499505a65fb25d0e02d118cc (patch) | |
tree | b347c3901d2d590d8c2b8c3be993ef20b278e61f /include/linux | |
parent | 7d27558c4138ac6b3684dea35c2f4379b940a7dd (diff) |
clocksource: sanity check sysfs clocksource changes
Thomas, Andrew and Ingo pointed out that we don't have any safety checks
in the clocksource sysfs entries to make sure sysadmins don't try to
change the clocksource to a non high-res timer capable clocksource (such
as jiffies) when high-res timers (HRT) is enabled. Doing so will likely
hang a system.
Correct this by filtering non HRT clocksources from available_clocksources
and not accepting non HRT clocksources with HRT enabled.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hrtimer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 0d2f7c8a33d6..58021b0c396d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -305,7 +305,7 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer) | |||
305 | 305 | ||
306 | extern ktime_t ktime_get(void); | 306 | extern ktime_t ktime_get(void); |
307 | extern ktime_t ktime_get_real(void); | 307 | extern ktime_t ktime_get_real(void); |
308 | 308 | extern int hrtimer_hres_active(void); | |
309 | 309 | ||
310 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); | 310 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); |
311 | 311 | ||