[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3877989d0905202234o24b973a8ge8a074ea79ccac51@mail.gmail.com>
Date: Thu, 21 May 2009 13:34:33 +0800
From: Luming Yu <luming.yu@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Subject: [patch] can't switch to jiffies clocksource
Hello,
As this bug https://bugzilla.redhat.com/show_bug.cgi?id=496028,
echo jiffies > clocksource0/current_clocksource make system crash.
I reproduced the problem with upstream kernel.
The root cause is that jiffies is just a variable in memory,
it relies on other clock source to tick , and it never ticks on itself.
Please review, and apply.
**The patch is enclosed in text attachment*
**Using web client to send the patch* *
**below is for review, please apply attached patch*/
Thanks,
Luming
Signed-off-by: Yu Luming <luming.yu@...el.com>
clocksource.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
iff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index ecfd7b5..bdffe43 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -507,8 +507,9 @@ static ssize_t sysfs_override_clocksource(struct
sys_device *dev,
/* try to select it: */
list_for_each_entry(cs, &clocksource_list, list) {
if (strlen(cs->name) == len &&
- !strcmp(cs->name, override_name))
- ovr = cs;
+ !strcmp(cs->name, override_name) &&
+ cs != &clocksource_jiffies)
+ ovr = cs;
}
}
Download attachment "1.patch" of type "application/octet-stream" (524 bytes)
Powered by blists - more mailing lists