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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to