X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Ftty_io.c;h=0e6866fe0f96d5fb19b0098a85d4a5ba52351d33;hb=7a49efae71397cf7e9299bbb22b2d12f7cf12428;hp=e1b46bc7e43cd245794f02610afe6c88d49eeb47;hpb=375614422509c98a1f3dbef410206bf81775169b;p=linux-2.6 diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index e1b46bc7e4..0e6866fe0f 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -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);