Re: [PATCH] TTY: Fix loss of echoed characters (2nd follow-on PATCHattached)

From: Alan Cox
Date: Tue Sep 09 2008 - 06:56:17 EST


On Mon, 8 Sep 2008 17:32:50 -0700
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Mon, 08 Sep 2008 10:11:46 -0600
> Joe Peterson <joe@xxxxxxxxxxx> wrote:
>
> > + spin_lock_irqsave(&tty->echo_lock, flags);
> > lock_kernel();
>
> Taking a spinlock outside lock_kernel() isn't good, and is quite unusual.
>
> - It might be ab/ba deadlockable (I didn't check) (I trust you always
> test with lockdep enabled?)

lock_kernel can sleep. Its not allowed...

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