[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ad6759fbf35d104dbf573cd6f4c6784ad6823f7e@git.kernel.org>
Date: Tue, 2 Mar 2010 08:24:35 GMT
From: tip-bot for john stultz <johnstul@...ibm.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
johnstul@...ibm.com, schwidefsky@...ibm.com, aaro.koskinen@....fi,
tglx@...utronix.de
Subject: [tip:timers/urgent] timekeeping: Prevent oops when GENERIC_TIME=n
Commit-ID: ad6759fbf35d104dbf573cd6f4c6784ad6823f7e
Gitweb: http://git.kernel.org/tip/ad6759fbf35d104dbf573cd6f4c6784ad6823f7e
Author: john stultz <johnstul@...ibm.com>
AuthorDate: Mon, 1 Mar 2010 12:34:43 -0800
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 2 Mar 2010 09:22:25 +0100
timekeeping: Prevent oops when GENERIC_TIME=n
Aaro Koskinen reported an issue in kernel.org bugzilla #15366, where
on non-GENERIC_TIME systems, accessing
/sys/devices/system/clocksource/clocksource0/current_clocksource
results in an oops.
It seems the timekeeper/clocksource rework missed initializing the
curr_clocksource value in the !GENERIC_TIME case.
Thanks to Aaro for reporting and diagnosing the issue as well as
testing the fix!
Reported-by: Aaro Koskinen <aaro.koskinen@....fi>
Signed-off-by: John Stultz <johnstul@...ibm.com>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: stable@...nel.org
LKML-Reference: <1267475683.4216.61.camel@...alhost.localdomain>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
kernel/time/clocksource.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 1f663d2..1f5dde6 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -592,6 +592,10 @@ static inline void clocksource_select(void) { }
*/
static int __init clocksource_done_booting(void)
{
+ mutex_lock(&clocksource_mutex);
+ curr_clocksource = clocksource_default_clock();
+ mutex_unlock(&clocksource_mutex);
+
finished_booting = 1;
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists