lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 27 Nov 2015 21:25:53 -0500
From:	Peter Hurley <peter@...leysoftware.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Jiri Slaby <jslaby@...e.cz>, linux-kernel@...r.kernel.org,
	Peter Hurley <peter@...leysoftware.com>
Subject: [PATCH 08/12] pty: Prepare to redefine tty driver remove() interface

BSD pty drivers are cross-linked at driver initialization and linked pairs
must have the same tty index; use this information to simplify clearing
the driver tables.

Signed-off-by: Peter Hurley <peter@...leysoftware.com>
---
 drivers/tty/pty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index be5020d..2680044 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -463,10 +463,8 @@ static int pty_install(struct tty_driver *driver, struct tty_struct *tty)
 
 static void pty_remove(struct tty_driver *driver, struct tty_struct *tty)
 {
-	struct tty_struct *pair = tty->link;
 	driver->ttys[tty->index] = NULL;
-	if (pair)
-		pair->driver->ttys[pair->index] = NULL;
+	driver->other->ttys[tty->index] = NULL;
 }
 
 static int pty_bsd_ioctl(struct tty_struct *tty,
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists