* [PATCH] fix oops at pmac_zilog rmmod'ing
@ 2004-03-29 8:51 Colin Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Colin Leroy @ 2004-03-29 8:51 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Andrew Morton; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 411 bytes --]
Hi,
rmmod'ing pmac_zilog currently oopses because uart_unregister_driver(),
which nullifies drv->tty_driver, is called before uart_remove_one_port(),
which uses said drv->tty_driver.
The comment at top of uart_unregister_driver() specifically says we have
to have removed all our ports
via uart_remove_one_port() before.
HTH,
--
Colin
This message represents the official view of the voices
in my head.
[-- Attachment #2: pmac_zilog_fix.patch --]
[-- Type: application/octet-stream, Size: 650 bytes --]
--- drivers/serial/pmac_zilog.c.orig 2004-03-29 10:41:22.000000000 +0200
+++ drivers/serial/pmac_zilog.c 2004-03-29 10:42:07.000000000 +0200
@@ -1875,9 +1875,6 @@
/* Get rid of macio-driver (detach from macio) */
macio_unregister_driver(&pmz_driver);
- /* Unregister UART driver */
- uart_unregister_driver(&pmz_uart_reg);
-
for (i = 0; i < pmz_ports_count; i++) {
struct uart_pmac_port *uport = &pmz_ports[i];
if (uport->node != NULL) {
@@ -1885,6 +1882,8 @@
pmz_dispose_port(uport);
}
}
+ /* Unregister UART driver */
+ uart_unregister_driver(&pmz_uart_reg);
}
#ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] fix oops at pmac_zilog rmmod'ing
@ 2004-03-29 9:05 Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2004-03-29 9:05 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list
Andrew / Linus, please apply
Ben.
-----Forwarded Message-----
From: Colin Leroy <colin@colino.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix oops at pmac_zilog rmmod'ing
Date: Mon, 29 Mar 2004 10:51:37 +0200
Hi,
rmmod'ing pmac_zilog currently oopses because uart_unregister_driver(),
which nullifies drv->tty_driver, is called before uart_remove_one_port(),
which uses said drv->tty_driver.
The comment at top of uart_unregister_driver() specifically says we have
to have removed all our ports
via uart_remove_one_port() before.
HTH,
--- drivers/serial/pmac_zilog.c.orig 2004-03-29 10:41:22.000000000 +0200
+++ drivers/serial/pmac_zilog.c 2004-03-29 10:42:07.000000000 +0200
@@ -1875,9 +1875,6 @@
/* Get rid of macio-driver (detach from macio) */
macio_unregister_driver(&pmz_driver);
- /* Unregister UART driver */
- uart_unregister_driver(&pmz_uart_reg);
-
for (i = 0; i < pmz_ports_count; i++) {
struct uart_pmac_port *uport = &pmz_ports[i];
if (uport->node != NULL) {
@@ -1885,6 +1882,8 @@
pmz_dispose_port(uport);
}
}
+ /* Unregister UART driver */
+ uart_unregister_driver(&pmz_uart_reg);
}
#ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-29 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-29 8:51 [PATCH] fix oops at pmac_zilog rmmod'ing Colin Leroy
2004-03-29 9:05 Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®