From: tip-bot for john stultz <johnstul@us.ibm.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
johnstul@us.ibm.com, schwidefsky@de.ibm.com,
aaro.koskinen@iki.fi, tglx@linutronix.de
Subject: [tip:timers/urgent] timekeeping: Prevent oops when GENERIC_TIME=n
Date: Tue, 2 Mar 2010 08:24:35 GMT [thread overview]
Message-ID: <tip-ad6759fbf35d104dbf573cd6f4c6784ad6823f7e@git.kernel.org> (raw)
In-Reply-To: <1267475683.4216.61.camel@localhost.localdomain>
Commit-ID: ad6759fbf35d104dbf573cd6f4c6784ad6823f7e
Gitweb: http://git.kernel.org/tip/ad6759fbf35d104dbf573cd6f4c6784ad6823f7e
Author: john stultz <johnstul@us.ibm.com>
AuthorDate: Mon, 1 Mar 2010 12:34:43 -0800
Committer: Thomas Gleixner <tglx@linutronix.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@iki.fi>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: stable@kernel.org
LKML-Reference: <1267475683.4216.61.camel@localhost.localdomain>
Signed-off-by: Thomas Gleixner <tglx@linutronix.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;
/*
next prev parent reply other threads:[~2010-03-02 8:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 20:34 [RESEND][PATCH] Fix oops on !GENERIC_TIME systems when accessing current_clocksource john stultz
2010-03-02 8:24 ` tip-bot for john stultz [this message]
2010-03-08 21:22 ` 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=tip-ad6759fbf35d104dbf573cd6f4c6784ad6823f7e@git.kernel.org \
--to=johnstul@us.ibm.com \
--cc=aaro.koskinen@iki.fi \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=schwidefsky@de.ibm.com \
--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