]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/tty_io.c
tty_open can return to userspace holding tty_mutex
[linux-2.6-omap-h63xx.git] / drivers / char / tty_io.c
index d33e5ab061779a67e63b305b30b29d01f6fe38ca..bc84e125c6bc428ca1d51cbcb29909466ea96b87 100644 (file)
@@ -1817,8 +1817,10 @@ got_driver:
                /* check whether we're reopening an existing tty */
                tty = tty_driver_lookup_tty(driver, inode, index);
 
-               if (IS_ERR(tty))
+               if (IS_ERR(tty)) {
+                       mutex_unlock(&tty_mutex);
                        return PTR_ERR(tty);
+               }
        }
 
        if (tty) {