linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix oops if scan_dispatch_log is called too early
@ 2011-04-08  7:44 Anton Blanchard
  0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2011-04-08  7:44 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev


We currently enable interrupts before the dispatch log for the boot
cpu is setup. If a timer interrupt comes in early enough we oops in
scan_dispatch_log:

Unable to handle kernel paging request for data at address 0x00000010

...

.scan_dispatch_log+0xb0/0x170
.account_system_vtime+0xa0/0x220
.irq_enter+0x88/0xc0
.do_IRQ+0x48/0x230

The patch below adds a check to scan_dispatch_log to ensure the
dispatch log has been allocated.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
---

Index: powerpc.git/arch/powerpc/kernel/time.c
===================================================================
--- powerpc.git.orig/arch/powerpc/kernel/time.c	2011-04-05 18:38:40.814489516 +1000
+++ powerpc.git/arch/powerpc/kernel/time.c	2011-04-08 12:16:41.864748155 +1000
@@ -229,6 +229,9 @@ static u64 scan_dispatch_log(u64 stop_tb
 	u64 stolen = 0;
 	u64 dtb;
 
+	if (!dtl)
+		return 0;
+
 	if (i == vpa->dtl_idx)
 		return 0;
 	while (i < vpa->dtl_idx) {

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

only message in thread, other threads:[~2011-04-08  7:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08  7:44 [PATCH] powerpc: Fix oops if scan_dispatch_log is called too early Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).