]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/tty_io.c
Merge branch 'x86/fpu' into x86/urgent
[linux-2.6-omap-h63xx.git] / drivers / char / tty_io.c
index e1b46bc7e43cd245794f02610afe6c88d49eeb47..0e6866fe0f96d5fb19b0098a85d4a5ba52351d33 100644 (file)
@@ -1161,8 +1161,8 @@ void disassociate_ctty(int on_exit)
        tty = get_current_tty();
        if (tty) {
                tty_pgrp = get_pid(tty->pgrp);
-               mutex_unlock(&tty_mutex);
                lock_kernel();
+               mutex_unlock(&tty_mutex);
                /* XXX: here we race, there is nothing protecting tty */
                if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY)
                        tty_vhangup(tty);