clocksource: sanity check sysfs clocksource changes
authorjohn stultz <johnstul@us.ibm.com>
Thu, 22 Jan 2009 05:53:22 +0000 (22:53 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Jun 2009 09:24:52 +0000 (11:24 +0200)
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>

No differences found