cvs commit: src/sys/dev/snp snp.c

Konstantin Belousov kib at FreeBSD.org
Thu Jan 3 04:31:45 PST 2008


kib         2008-01-03 12:31:45 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sys/dev/snp          snp.c 
  Log:
  MFC rev. 1.106:
  Do not allow the SNPSTTY ioctl for the snoop device that has a tty
  attached. Otherwise, the snp->snp_tty would be overwritten, while the
  tty line discipline still set to the snpdisc. Then snplwrite() causes
  panic because ttytosnp() cannot find the snp. (And do it at the proper
  place, from rev. 1.107).
  
  MFC rev. 1.107:
  The snp_target == NULL implies the snp_tty == NULL. Remove the code
  that is put under snp_target == NULL and snp_tty != NULL clause.
  
  In snpclose(), do the snp_detach() before scheduling the snp device
  destruction. Otherwise, after the return from snpclose(), the snp
  device is already removed from the snp_list, but tty is still in
  snooped state. Any attempt to do i/o on such tty cause panic because
  ttytosnp() returns NULL.
  
  Approved by:    re (kensmith)
  
  Revision   Changes    Path
  1.105.2.1  +7 -9      src/sys/dev/snp/snp.c


More information about the cvs-src mailing list