Re: Debian kernel regression, was Re: Modernizing a Macintosh LC III

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 21 Nov 2013, Geert Uytterhoeven wrote:

Unable to handle kernel NULL pointer dereference at virtual address   (null)
Oops: 00000000
PC: [<0013ad28>] __pmz_startup+0x32/0x2a0

[snip]

Call Trace: [<002c5d3e>] pmz_console_setup+0x64/0xe4
 [<00009600>] atari_keyboard_interrupt+0x164/0x2dc
 [<000499f4>] register_console+0x104/0x2a6
 [<000fc4a8>] strlen+0x0/0x14
 [<00048b96>] printk+0x0/0x26
 [<002c5cd4>] pmz_console_init+0x10/0x16

[snip]


drivers/tty/serial/pmac_zilog.c needs some MACH_IS_MAC() tests.


The platform devices pmz_ports[X].pdev aren't supposed to be used unless 
config_mac() first initializes them (when MACH_IS_MAC). Unfortunately the 
null pointer test in pmz_console_setup() never succeeds because 
pmz_probe() always sets those pointers, so make sure they remain null when 
the platform device isn't valid.

Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>

---

I haven't even compiled this. Geert, can you please build and test?


Index: linux-3.12/drivers/tty/serial/pmac_zilog.c
===================================================================
--- linux-3.12.orig/drivers/tty/serial/pmac_zilog.c	2013-11-04 10:41:51.000000000 +1100
+++ linux-3.12/drivers/tty/serial/pmac_zilog.c	2013-11-22 10:07:06.000000000 +1100
@@ -1748,8 +1748,10 @@ static int __init pmz_probe(void)
 	pmz_ports[0].flags     = PMACZILOG_FLAG_IS_CHANNEL_A;
 	pmz_ports[0].pdev      = &scc_a_pdev;
 	err = pmz_init_port(&pmz_ports[0]);
-	if (err)
+	if (err) {
+		pmz_ports[0].pdev = NULL;
 		return err;
+	}
 	pmz_ports_count++;
 
 	pmz_ports[0].mate      = &pmz_ports[1];
@@ -1758,8 +1760,10 @@ static int __init pmz_probe(void)
 	pmz_ports[1].flags     = 0;
 	pmz_ports[1].pdev      = &scc_b_pdev;
 	err = pmz_init_port(&pmz_ports[1]);
-	if (err)
+	if (err) {
+		pmz_ports[1].pdev = NULL;
 		return err;
+	}
 	pmz_ports_count++;
 
 	return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux