kernel - Fix tty session panic
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 26 Aug 2010 17:50:00 +0000 (10:50 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 26 Aug 2010 17:50:00 +0000 (10:50 -0700)
commit94a6eea8b2dcb172e2c46bb304dd0c23780a6406
treee8fe2c0fe8c7e1e12fc22a3be955fe3a197a6102
parent4e28d64faea342691c2287d675a9ca5786c8fc27
kernel - Fix tty session panic

* Ref-count the session->s_ttyp references to ttys and do not
  destroy a tty unless it is zero.

* This should fix remaining panics in this area.  My last attempt
  to fix it (testing tp->t_session) did not work due to the possibility
  of the tty being half-closed.
sys/kern/kern_proc.c
sys/kern/tty.c
sys/kern/tty_pty.c