Initialize device numbers for newly allocated ptys. Prevents a panic caused by
authoranton <anton@openbsd.org>
Wed, 29 Aug 2018 06:04:46 +0000 (06:04 +0000)
committeranton <anton@openbsd.org>
Wed, 29 Aug 2018 06:04:46 +0000 (06:04 +0000)
commitda624270dac3873408aca8cd90ef214e21a5ac81
tree2a7bb304c8bda238c255248324e49fa389be8252
parent175f768bfbe5f3b8e0ee49f9b8da968dab1667cb
Initialize device numbers for newly allocated ptys. Prevents a panic caused by
the following: a new pty is allocated in which the kernel console output is
redirected to, poll(2):ing from /dev/console at this point would be delegated to
the device with the major number taken from the pty due to the earlier
redirection. Since the pty does not have its correct device major assigned, the
wrong device ends up being used.

ok deraadt@ millert@
sys/kern/tty_pty.c