Skip to content

Commit

Permalink
tty: drop the pty lock during hangup
Browse files Browse the repository at this point in the history
In theory we don't need it, in practice we are hitting some ill understood
deadlock when we don't drop it. The old code dropped it here so we are not
undoing anything problematic for pty. If pty could be unloaded it would be
a problem but it can't.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed May 9, 2012
1 parent fd11b42 commit b1d679a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
mutex_unlock(&devpts_mutex);
}
#endif
tty_unlock(tty);
tty_vhangup(tty->link);
tty_lock(tty);
}
}

Expand Down

0 comments on commit b1d679a

Please sign in to comment.