Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jul 2019 14:20:14 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r349806 - stable/11/sys/kern
Message-ID:  <201907071420.x67EKEu4034634@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sun Jul  7 14:20:14 2019
New Revision: 349806
URL: https://svnweb.freebsd.org/changeset/base/349806

Log:
  MFC r349733:
  Defer funsetown() calls for a TTY to tty_rel_free().

Modified:
  stable/11/sys/kern/tty.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/tty.c
==============================================================================
--- stable/11/sys/kern/tty.c	Sun Jul  7 14:19:46 2019	(r349805)
+++ stable/11/sys/kern/tty.c	Sun Jul  7 14:20:14 2019	(r349806)
@@ -230,9 +230,6 @@ ttydev_leave(struct tty *tp)
 
 	tp->t_flags |= TF_OPENCLOSE;
 
-	/* Stop asynchronous I/O. */
-	funsetown(&tp->t_sigio);
-
 	/* Remove console TTY. */
 	if (constty == tp)
 		constty_clear();
@@ -1122,6 +1119,9 @@ tty_rel_free(struct tty *tp)
 		tty_unlock(tp);
 		return;
 	}
+
+	/* Stop asynchronous I/O. */
+	funsetown(&tp->t_sigio);
 
 	/* TTY can be deallocated. */
 	dev = tp->t_dev;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907071420.x67EKEu4034634>