Re: 2.6.9-rc2-mm3

From: Paul Fulghum
Date: Fri Sep 24 2004 - 22:30:03 EST


On Fri, 2004-09-24 at 20:31, William Lee Irwin III wrote:
> Thanks for tracking these down. Those appear to be the culprits here
> also. Are there patches implementing the fixes Paul Fulghum suggested
> yet? Successful bootlog on 4x x86-64 included as a MIME attachment.

My suggestion was flawed in that it could
violate POSIX requirements (as Russell pointed out).

Removing the lock from tty_termios_baud_rate(), tty_io.c
corrects the problem for the path from change_termios()
to tty_termios_baud_rate(), which is causing the deadlock.

This may not be, and probably is not,
correct for all paths to tty_termios_baud_rate().

The following patch (against 2.6.9-rc2-mm3)
fixes the deadlock for testing purposes,
but is not a complete solution.

As Alan works through this feedback,
the final fix will emerge.

--
Paul Fulghum
paulkf@xxxxxxxxxxxxx

--- a/drivers/char/tty_io.c 2004-09-24 22:12:40.000000000 -0500
+++ b/drivers/char/tty_io.c 2004-09-24 22:14:53.000000000 -0500
@@ -2478,9 +2478,7 @@
int tty_termios_baud_rate(struct termios *termios)
{
unsigned int cbaud;
- unsigned long flags;

- spin_lock_irqsave(&tty_termios_lock, flags);
cbaud = termios->c_cflag & CBAUD;

if (cbaud & CBAUDEX) {
@@ -2491,7 +2489,6 @@
else
cbaud += 15;
}
- spin_unlock_irqrestore(&tty_termios_lock, flags);
return baud_table[cbaud];
}



-
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/