浏览代码

tty: drop the pty lock during hangup

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>
Alan Cox 13 年之前
父节点
当前提交
b1d679afd7
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/tty/pty.c

+ 2 - 0
drivers/tty/pty.c

@@ -63,7 +63,9 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
 		        mutex_unlock(&devpts_mutex);
 		        mutex_unlock(&devpts_mutex);
 		}
 		}
 #endif
 #endif
+		tty_unlock(tty);
 		tty_vhangup(tty->link);
 		tty_vhangup(tty->link);
+		tty_lock(tty);
 	}
 	}
 }
 }