Browse Source

pty: Don't drop pty master tty lock to hangup slave

With the revised tty lock order and lockdep annotation, claiming
the pty slave lock is now safe while still holding the pty master lock.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Hurley 10 năm trước cách đây
mục cha
commit
1bb954153a
1 tập tin đã thay đổi với 0 bổ sung2 xóa
  1. 0 2
      drivers/tty/pty.c

+ 0 - 2
drivers/tty/pty.c

@@ -66,9 +66,7 @@ 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);
 	}
 	}
 }
 }