Re: [PATCH] Fix typo in pmac_zilog

From: David S. Miller
Date: Sun May 30 2004 - 19:34:27 EST


On Sun, 30 May 2004 17:13:38 +1000
Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote:

> There is a deadlock issue. I triggered once when I had a bug where the
> driver was flooding the input with zero's. All serial drivers seem to be
> affected. Apparently, tty_flip_* may call back into your write() routine

Yes indeed, one code path is:

tty_flip_buffer_push()
if (tty->low_latency)
flush_to_ldisc() {
tty->ldisc.receive_buf() == n_tty_receive_buf() {
...
n_tty_receive_char() {
...
start_tty() {
tty->driver->start() == uart_start()

and that's where we try to grab the uart port lock again.

It seems lots of serial drivers have this bug, even 8250.c :-)

I'll fix up the Sparc drivers meanwhile.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/