cvs commit: src/sys/kern tty.c

Konstantin Belousov kib at
Fri Jul 20 09:41:54 UTC 2007

kib         2007-07-20 09:41:54 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             tty.c 
  ttyfree() frees the cdev().  But if there are pending kevents,
  filt_ttyrdetach() etc would later attempt to dereference cdev->si_tty,
  causing a 0xdeadc0de dereference.  Change kn_hook value from cdev to
  struct tty to avoid dereferencing freed cdev.
  In ttygone(), wake up select(), sigio and kevent() users in addition
  to the queue sleepers.
  Return EV_EOF from kevent filters if TS_GONE is set.
  Submitted by:   peter
  Tested by:      Peter Holm
  Approved by:    re (kensmith)
  MFC after:      2 weeks
  Revision  Changes    Path
  1.273     +17 -7     src/sys/kern/tty.c

More information about the cvs-src mailing list