mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
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:
parent
d8f4dd34d6
commit
856ebf8530
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182917
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue