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>] [day] [month] [year] [list]
Date:	Sat,  7 Oct 2006 01:01:35 +0200 (CEST)
From:	Jiri Slaby <jirislaby@...il.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: [PATCH 1/6] Char: mxser_new, eliminate tty ldisc deref

mxser_new, eliminate tty ldisc deref

Use tty_ldisc_flush and tty_wakeup helpers for accessing ldisc internals.

Cc: Alan Cox <alan@...rguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@...il.com>

---
commit f1ec019ded64c90bc2c8017a41bd77c8f900711c
tree 2c0916affadc7d056cd8ce397109a3f85bfc4c1f
parent b886c49c87ee91a038b917f6933183db8ae58125
author Jiri Slaby <jirislaby@...il.com> Fri, 06 Oct 2006 23:14:52 +0200
committer Jiri Slaby <xslaby@...moi.localdomain> Fri, 06 Oct 2006 23:14:52 +0200

 drivers/char/mxser_new.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index a555dda..1f53e07 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -1065,7 +1065,6 @@ static void mxser_close(struct tty_struc
 
 	unsigned long timeout;
 	unsigned long flags;
-	struct tty_ldisc *ld;
 
 	if (tty->index == MXSER_PORTS)
 		return;
@@ -1145,12 +1144,7 @@ static void mxser_close(struct tty_struc
 	if (tty->driver->flush_buffer)
 		tty->driver->flush_buffer(tty);
 
-	ld = tty_ldisc_ref(tty);
-	if (ld) {
-		if (ld->flush_buffer)
-			ld->flush_buffer(tty);
-		tty_ldisc_deref(ld);
-	}
+	tty_ldisc_flush(tty);
 
 	tty->closing = 0;
 	info->event = 0;
@@ -1303,9 +1297,7 @@ static void mxser_flush_buffer(struct tt
 	spin_unlock_irqrestore(&info->slock, flags);
 	/* above added by shinhay */
 
-	wake_up_interruptible(&tty->write_wait);
-	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
-		(tty->ldisc.write_wakeup) (tty);
+	tty_wakeup(tty);
 }
 
 /*
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ