public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: Fix ptmx open without closed slave.
@ 2012-12-19 19:00 Ilya Zykov
  2013-01-16  7:04 ` Greg Kroah-Hartman
  2013-01-31  3:50 ` Peter Hurley
  0 siblings, 2 replies; 5+ messages in thread
From: Ilya Zykov @ 2012-12-19 19:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Alan Cox, Jiri Slaby, linux-kernel, linux-serial

When we are opening ptmx, we have closed pts, by description.
Now only if we open and after close all pts' descriptions, pty_close() sets
this bit correctly

Signed-off-by: Ilya Zykov <ilya@ilyx.ru>
---
 drivers/tty/pty.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 1ce1362..7b69307 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -659,6 +659,7 @@ static int ptmx_open(struct inode *inode, struct file *filp)
 	retval = ptm_driver->ops->open(tty, filp);
 	if (retval)
 		goto err_release;
+	set_bit(TTY_OTHER_CLOSED, &tty->flags); /* THE SLAVE STILL CLOSED */
 
 	tty_unlock(tty);
 	return 0;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-31  3:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 19:00 [PATCH] tty: Fix ptmx open without closed slave Ilya Zykov
2013-01-16  7:04 ` Greg Kroah-Hartman
2013-01-16  7:48   ` Ilya Zykov
2013-01-16  7:56     ` Greg Kroah-Hartman
2013-01-31  3:50 ` Peter Hurley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox