diff options
-rw-r--r-- | drivers/char/tty_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index e1b46bc7e43c..0e6866fe0f96 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -1161,8 +1161,8 @@ void disassociate_ctty(int on_exit) | |||
1161 | tty = get_current_tty(); | 1161 | tty = get_current_tty(); |
1162 | if (tty) { | 1162 | if (tty) { |
1163 | tty_pgrp = get_pid(tty->pgrp); | 1163 | tty_pgrp = get_pid(tty->pgrp); |
1164 | mutex_unlock(&tty_mutex); | ||
1165 | lock_kernel(); | 1164 | lock_kernel(); |
1165 | mutex_unlock(&tty_mutex); | ||
1166 | /* XXX: here we race, there is nothing protecting tty */ | 1166 | /* XXX: here we race, there is nothing protecting tty */ |
1167 | if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY) | 1167 | if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY) |
1168 | tty_vhangup(tty); | 1168 | tty_vhangup(tty); |