Merge commit 'v2.6.31-rc7' into x86/cpu
[cascardo/linux.git] / drivers / char / tty_io.c
index 939e198..a3afa0c 100644 (file)
@@ -1263,7 +1263,9 @@ static int tty_reopen(struct tty_struct *tty)
        tty->count++;
        tty->driver = driver; /* N.B. why do this every time?? */
 
+       mutex_lock(&tty->ldisc_mutex);
        WARN_ON(!test_bit(TTY_LDISC, &tty->flags));
+       mutex_unlock(&tty->ldisc_mutex);
 
        return 0;
 }