Re: [patch] small tty irq race fix

From: Linus Torvalds (torvalds@transmeta.com)
Date: Mon Mar 03 2003 - 16:39:30 EST


On Mon, 3 Mar 2003, Nicolas Pitre wrote:
>
> What about this one? It just happens that tty->read_lock is actually used
> deeper in the same call instance (in n_tty.c) so this looks to be the best
> lock to use.

Looks ok. I would suggest moving the "spin_lock_irqsave()" to outside the
'if'-statement, though, since that should make the code a lot more
readable, and if the lock is supposed to protect tty->flip.buf_num, then
let's do it right and protect the read as well, no?

                Linus

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



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:23 EST