From: john stultz <johnstul@us.ibm.com>
To: greg kh <greg@kroah.com>, Ingo Molnar <mingo@elte.hu>, stable@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
aaro.koskinen@iki.fi, lkml <linux-kernel@vger.kernel.org>
Subject: [RESEND][PATCH] Fix oops on !GENERIC_TIME systems when accessing current_clocksource
Date: Mon, 01 Mar 2010 12:34:43 -0800 [thread overview]
Message-ID: <1267475683.4216.61.camel@localhost.localdomain> (raw)
No one has replied to this, so I wanted to send it out again.
Aaro Koskinen reported an issue in bug #15366, where on non-GENERIC_TIME
systems,
accessing /sys/devices/system/clocksource/clocksource0/current_clocksource would oops the system.
It seems the timekeeper/clocksource rework missed initializing the
curr_clocksource value in the !GENERIC_TIME.
The following patch makes sure it gets initialized, and avoids the
issue.
Thanks to Aaro for reporting and diagnosing the issue as well as testing
the fix!
Bug Details: http://bugzilla.kernel.org/show_bug.cgi?id=15366
Too late for 2.6.33, but this likely should go into 2.6.33-stable and
2.6.32-stable.
thanks
-john
Signed-off-by: John Stultz <johnstul@us.ibm.com>
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index e85c234..c436ee5 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -568,6 +568,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;
/*
next reply other threads:[~2010-03-01 20:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 20:34 john stultz [this message]
2010-03-02 8:24 ` [tip:timers/urgent] timekeeping: Prevent oops when GENERIC_TIME=n tip-bot for john stultz
2010-03-08 21:22 ` [RESEND][PATCH] Fix oops on !GENERIC_TIME systems when accessing current_clocksource john stultz
2010-03-08 21:33 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1267475683.4216.61.camel@localhost.localdomain \
--to=johnstul@us.ibm.com \
--cc=aaro.koskinen@iki.fi \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwidefsky@de.ibm.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome