Thread (4 messages) flat view 4 messages, 2 authors, 2011-07-08
STALE5545d

[PATCH] arm: fix oops in sched_clock_poll

From: tom.leiming@gmail.com (Ming Lei)
Date: 2011-01-20 04:35:22
Also in: linux-omap

Hi,

2011/1/20 Russell King - ARM Linux [off-list ref]:
On Thu, Jan 20, 2011 at 12:47:21AM +0800, tom.leiming at gmail.com wrote:
quoted
From: Ming Lei <tom.leiming@gmail.com>

The patch fixes one oops in sched_clock_poll, tested on
beagle xm, follows the oops message:
quoted
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c
index 9a46370..782dd08 100644
--- a/arch/arm/kernel/sched_clock.c
+++ b/arch/arm/kernel/sched_clock.c
@@ -21,7 +21,9 @@ static void (*sched_clock_update_fn)(void);
?static void sched_clock_poll(unsigned long wrap_ticks)
?{
? ? ? mod_timer(&sched_clock_timer, round_jiffies(jiffies + wrap_ticks));
- ? ? sched_clock_update_fn();
+
+ ? ? if (sched_clock_update_fn)
+ ? ? ? ? ? ? sched_clock_update_fn();
It's called here because it's supposed to be initialized by the time this
function is called. ?Please ensure that is the case.
On omap2,  sched_clock_update_fn is initialized in omap_init_clocksource_32k,
and certainly is after calling sched_clock_poll, so the oops is triggered.


thanks,
-- 
Lei Ming
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help