svn commit: r349805 - stable/12/sys/kern

Mark Johnston markj at FreeBSD.org
Sun Jul 7 14:19:48 UTC 2019


Author: markj
Date: Sun Jul  7 14:19:46 2019
New Revision: 349805
URL: https://svnweb.freebsd.org/changeset/base/349805

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

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

Modified: stable/12/sys/kern/tty.c
==============================================================================
--- stable/12/sys/kern/tty.c	Sun Jul  7 14:19:19 2019	(r349804)
+++ stable/12/sys/kern/tty.c	Sun Jul  7 14:19:46 2019	(r349805)
@@ -231,9 +231,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();
@@ -1123,6 +1120,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;


More information about the svn-src-stable-12 mailing list