TTY: pmac_zilog, check existence of ports in pmz_console_init()
Subsystems (3)
PATCH 1/2 TTY: pmac_zilog, check existence of ports in pmz_console_init()
When booting a multi-platform m68k kernel on a non-Mac with "console=ttyS0" on the kernel command line, it crashes with:
Unable to handle kernel NULL pointer dereference at virtual address (null) Oops: 00000000 PC: [<0013ad28>] __pmz_startup+0x32/0x2a0 ... Call Trace: [<002c5d3e>] pmz_console_setup+0x64/0xe4
The normal tty driver doesn't crash, because init_pmz() checks pmz_ports_count again after calling pmz_probe().
In the serial console initialization path, pmz_console_init() doesn't do this, causing the driver to crash later.
Add a check for pmz_ports_count to fix this.
--- drivers/tty/serial/pmac_zilog.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/tty/serial/pmac_zilog.c +3 -0
@@ -2052,6 +2052,9 @@ static int __init pmz_console_init(void)/* Probe ports */ pmz_probe (); +if (pmz_ports_count ==0 ) +return -ENODEV ; +/* TODO: Autoprobe console based on OF */ /* pmz_console.index = i; */ register_console (&pmz_console);
Signature · 1 line
1.7.9.5
PATCH 2/2 TTY: amiserial, add missing platform check
When booting a multi-platform m68k kernel on a non-Amiga with "console=ttyS0" on the kernel command line, it crashes with:
Unable to handle kernel access at virtual address 81dff01c Oops: 00000000 PC: [<001e09a8>] serial_console_write+0xc/0x70
Add the missing platform check to amiserial_console_init() to fix this.
--- drivers/tty/amiserial.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/tty/amiserial.c +3 -0
@@ -1855,6 +1855,9 @@ static struct console sercons = {*/ static int __init amiserial_console_init (void ) { +if (!MACH_IS_AMIGA ) +return -ENODEV ; +register_console (&sercons);return 0 ; }
Signature · 1 line
1.7.9.5
Quoted 2 lines · Geert Uytterhoeven
When booting a multi-platform m68k kernel on a non-Mac with "console=ttyS0" on the kernel command line, it crashes with:
Can we please get this in stable, too?
commit dc1dc2f8a5dd863bf2e79f338fc3ae29e99c683a
Thanks!
Quoted 9 lines
Unable to handle kernel NULL pointer dereference at virtual address (null) Oops: 00000000 PC: [<0013ad28>] __pmz_startup+0x32/0x2a0 ... Call Trace: [<002c5d3e>] pmz_console_setup+0x64/0xe4The normal tty driver doesn't crash, because
init_pmz()checkspmz_ports_countagain after callingpmz_probe().
Quoted 8 lines
In the serial console initialization path,
pmz_console_init()doesn't do this, causing the driver to crash later.Add a check for
pmz_ports_countto fix this.Signed-off-by Geert Uytterhoeven <[email protected]>Cc Finn Thain <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Greg Kroah-Hartman
maintainerQuoted 8 lines · Geert Uytterhoeven
Quoted 2 lines · Geert Uytterhoeven
When booting a multi-platform m68k kernel on a non-Mac with "console=ttyS0" on the kernel command line, it crashes with:
Can we please get this in stable, too?
commit
dc1dc2f8a5dd863bf2e79f338fc3ae29e99c683a
Now applied, thanks.
greg k-h
Quoted 10 lines · Geert Uytterhoeven
Quoted 2 lines · Geert Uytterhoeven
When booting a multi-platform m68k kernel on a non-Mac with "console=ttyS0" on the kernel command line, it crashes with:
Can we please get this in stable, too?
commit
dc1dc2f8a5dd863bf2e79f338fc3ae29e99c683aThanks!
Thanks Geert, I'm queuing it for the 3.5 and 3.11 kernels as well.
Cheers,
--
Luis
Quoted 32 lines
Quoted 9 lines
Unable to handle kernel NULL pointer dereference at virtual address (null) Oops: 00000000 PC: [<0013ad28>] __pmz_startup+0x32/0x2a0 ... Call Trace: [<002c5d3e>] pmz_console_setup+0x64/0xe4The normal tty driver doesn't crash, because
init_pmz()checkspmz_ports_countagain after callingpmz_probe().Quoted 8 lines
In the serial console initialization path,
pmz_console_init()doesn't do this, causing the driver to crash later.Add a check for
pmz_ports_countto fix this.Signed-off-by Geert Uytterhoeven <[email protected]>Cc Finn Thain <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Geert Uytterhoeven
Quoted 2 lines · Geert Uytterhoeven
When booting a multi-platform m68k kernel on a non-Mac with "console=ttyS0" on the kernel command line, it crashes with:
Can we please get this in stable, too?
commit
dc1dc2f8a5dd863bf2e79f338fc3ae29e99c683a
[...]
I've queued this up for 3.2; sorry for the delay.
Ben.
Signature · 2 lines
Ben Hutchings If more than one person is responsible for a bug, no one is at fault.