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 [thread overview]
Message-ID: <156701c4156b$0be816a0$3cc8a8c0@epro.dom> (raw)
[-- 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
next reply other threads:[~2004-03-29 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 8:51 Colin Leroy [this message]
2004-03-29 9:05 Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='156701c4156b$0be816a0$3cc8a8c0@epro.dom' \
--to=colin@colino.net \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®