DragonFly BSD
DragonFly commits List (threaded) for 2006-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/kern tty.c tty_tty.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Apr 2006 14:32:23 -0700 (PDT)

dillon      2006/04/03 14:32:23 PDT

DragonFly src repository

  Modified files:
    sys/kern             tty.c tty_tty.c 
  Log:
  Because multiple opens of /dev/tty only issue one actual open to the
  underlying tty, unconditionally use FREAD|FWRITE for the VOP_OPEN/VOP_CLOSE
  calls.  Otherwise the modes may not match up on final close.
  
  Unconditionally reference the underlying tty when obtaining the lock for a
  read or write of /dev/tty.  If we do not do this then it is possible for
  the session reference to be ripped out from under us while we are obtaining
  the lock and for the vnode to be reused for another purpose without our
  knowledge.
  
  Reported-by: Kyle Butt <kylebutt@xxxxxxxxx>
  
  Revision  Changes    Path
  1.21      +4 -2      src/sys/kern/tty.c
  1.13      +33 -11    src/sys/kern/tty_tty.c


http://www.dragonflybsd.org/cvsweb/src/sys/kern/tty.c.diff?r1=1.20&r2=1.21&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/tty_tty.c.diff?r1=1.12&r2=1.13&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]