From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] NULL pointer dereference in uart_write_room().
Date: Wed, 7 May 2008 20:19:26 +0100 [thread overview]
Message-ID: <20080507191926.GA19802@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20080505113055.5284052e@core>
On Mon, May 05, 2008 at 11:30:55AM +0100, Alan Cox wrote:
> > (5) uart_remove_one_port() is called by serial8250_register_port()
> > since ttyS0 is already in use but it is requested to be once removed.
>
> That means 8250_pnp is taking over and then trying to delete the console,
> so its breakage in the serial layer glue. Perhaps Russell has some ideas
> as its hard to tell what he intended to happen originally.
Looking at the original report, yes, it is (and will) try to delete the
console.
However, it's doing the best it can to tell the tty layer "oi, this is
port going away, don't do anything more with it" by hanging it up.
The real question is: why, after we try to hang up a specific port, is
the tty layer continuing to use the port... and the answer is that the
tty layer exempts the console from the usual hangup processing.
IOW, you can not hang up the console port or indeed ever safely unregister
it.
Other solutions? Well, we could modify it in place but that gets awfully
icky and racy with... the console, so we wouldn't actually be solving
anything.
The only other solution I can think of is to basically deny any change
to the console port, so it never disappears, and therefore never becomes
owned by PNP, PCI or whatever. Which also means that it'll probably
mess up power management of it. I guess broken console PM is more
preferable than oopsing peoples machines.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2008-05-07 19:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <261636618@web.de>
[not found] ` <200805022300.GIB30385.FJOVHQSMFtOOFL@I-love.SAKURA.ne.jp>
2008-05-04 8:16 ` [BUG] NULL pointer dereference in uart_write_room() Tetsuo Handa
2008-05-05 10:30 ` Alan Cox
2008-05-06 16:03 ` Ben Greear
2008-05-06 21:23 ` Russell King
2008-05-07 15:23 ` Tetsuo Handa
2008-05-07 19:19 ` Russell King [this message]
2008-05-02 5:35 Tetsuo Handa
-- strict thread matches above, loose matches on Subject: below --
2008-04-22 7:49 Tetsuo Handa
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=20080507191926.GA19802@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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