Merge branch 's3c-fixes-rc4' of git://aeryn.fluff.org.uk/bjdooks/linux
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / char / tty_io.c
index 939e198d7670adfdad2068b4036a8d9348779444..a3afa0c387cdeb79c9dc9a406eb70935ceaf50d4 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;
 }