All of lore.kernel.org
 help / color / mirror / Atom feed
* [alternative-merged] clocksource-disallow-setting-jiffies-as-the-clocksource.patch removed from -mm tree
@ 2009-06-15 18:59 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-06-15 18:59 UTC (permalink / raw)
  To: luming.yu, johnstul, luming.yu, mingo, tglx, mm-commits


The patch titled
     clocksource: disallow setting jiffies as the clocksource
has been removed from the -mm tree.  Its filename was
     clocksource-disallow-setting-jiffies-as-the-clocksource.patch

This patch was dropped because an alternative patch was merged

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: clocksource: disallow setting jiffies as the clocksource
From: Luming Yu <luming.yu@gmail.com>

As reported in https://bugzilla.redhat.com/show_bug.cgi?id=496028,

	echo jiffies > clocksource0/current_clocksource

makes the 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.

Signed-off-by: Yu Luming <luming.yu@intel.com>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/time/clocksource.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN kernel/time/clocksource.c~clocksource-disallow-setting-jiffies-as-the-clocksource kernel/time/clocksource.c
--- a/kernel/time/clocksource.c~clocksource-disallow-setting-jiffies-as-the-clocksource
+++ a/kernel/time/clocksource.c
@@ -504,8 +504,9 @@ static ssize_t sysfs_override_clocksourc
 		/* 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;
 		}
 	}
 
_

Patches currently in -mm which might be from luming.yu@gmail.com are

linux-next.patch
clocksource-disallow-setting-jiffies-as-the-clocksource.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-15 18:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15 18:59 [alternative-merged] clocksource-disallow-setting-jiffies-as-the-clocksource.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.