Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1613087

[PATCH 2/3] tty: drop obsolete termios_locked comments

From Johan Hovold <johan@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 2/3] tty: drop obsolete termios_locked comments
Date 2017-03-30 15:50 +0200
Message-ID <tqICD-74s-29@gated-at.bofh.it> (permalink)
References <tqICB-74s-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Drop comments about tty-driver termios_locked structures, which have
been outdated since commit fe6e29fdb1a7 ("tty: simplify ktermios
allocation").

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/tty/tty_io.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 8e9651579d50..5f834dcb0b15 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1520,7 +1520,7 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
 	 * This code guarantees that either everything succeeds and the
 	 * TTY is ready for operation, or else the table slots are vacated
 	 * and the allocated memory released.  (Except that the termios
-	 * and locked termios may be retained.)
+	 * may be retained.)
 	 */
 
 	if (!try_module_get(driver->owner))
@@ -3441,11 +3441,6 @@ static void destruct_tty_driver(struct kref *kref)
 	struct ktermios *tp;
 
 	if (driver->flags & TTY_DRIVER_INSTALLED) {
-		/*
-		 * Free the termios and termios_locked structures because
-		 * we don't want to get memory leaks when modular tty
-		 * drivers are removed from the kernel.
-		 */
 		for (i = 0; i < driver->num; i++) {
 			tp = driver->termios[i];
 			if (tp) {
-- 
2.12.2

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] tty: close registration race and add termios reset feature Johan Hovold <johan@kernel.org> - 2017-03-30 15:50 +0200
  [PATCH 1/3] tty: close race between device register and open Johan Hovold <johan@kernel.org> - 2017-03-30 15:50 +0200
  [PATCH 2/3] tty: drop obsolete termios_locked comments Johan Hovold <johan@kernel.org> - 2017-03-30 15:50 +0200
  Re: [PATCH 0/3] tty: close registration race and add termios reset  feature Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-03-31 15:10 +0200

csiph-web