Make sure the TTY has not disappeared out from under us before calling

ttydevsw_outwakeup().  This should fix panics which occur after remote
login sessions timeout during moderate TTY activity.  An example of
where this might occur is where a pending write to the terminal is
occurring while sshd(8) is shutting down the TTY after a TCP timeout.

Submitted by:	ed
This commit is contained in:
Christian S.J. Peron 2008-09-10 20:12:10 +00:00
parent d8f4dd34d6
commit 856ebf8530

View File

@ -539,8 +539,9 @@ ttydisc_write(struct tty *tp, struct uio *uio, int ioflag)
} while (oblen > 0);
}
done:
ttydevsw_outwakeup(tp);
done:
if (!tty_gone(tp))
ttydevsw_outwakeup(tp);
/*
* Add the amount of bytes that we didn't process back to the