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

cvs commit: src/sys/kern src/sys/sys


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 13 Sep 2004 09:22:41 -0700 (PDT)

dillon      2004/09/13 09:22:41 PDT

DragonFly src repository

  Modified files:
    sys/kern             kern_proc.c subr_prf.c tty.c tty_cons.c 
    sys/sys              proc.h tty.h 
  Log:
  Clean up struct session hold/rele management.  The tty half-closed support
  (i.e. showing 'p0-' in the ps output for the tty instead of '??' after a
  process has detached) had an issue where the tty would be left with a
  reference to the freed session structure in certain situations because the
  session structure's ref-counting code was not properly implementing the
  release case.  Consolidate the disparate session ref-counting code into
  real sess_hold() and sess_rele() functions and ensure that any tty reference
  to the session is cleared before the session structure is free()'d.
  
  NOTE: Joerg noticed a 0xdeadc1de (deadcode) panic related to this issue
  which means that prior to this fix it was possible for the bug to cause
  memory corruption in certain situations.
  
  NOTE: Linux does not implement half-closed tty sessions like BSD.  Add code
  to implement fully-closed tty sessions, and document the whole mess, but
  leave it conditionalized-out for now.
  
  Reported-by: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
  
  Revision  Changes    Path
  1.17      +34 -4     src/sys/kern/kern_proc.c
  1.8       +2 -2      src/sys/kern/subr_prf.c
  1.12      +37 -3     src/sys/kern/tty.c
  1.14      +1 -2      src/sys/kern/tty_cons.c
  1.55      +2 -5      src/sys/sys/proc.h
  1.6       +1 -0      src/sys/sys/tty.h


http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_proc.c.diff?r1=1.16&r2=1.17&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/subr_prf.c.diff?r1=1.7&r2=1.8&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/tty.c.diff?r1=1.11&r2=1.12&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/tty_cons.c.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/proc.h.diff?r1=1.54&r2=1.55&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/tty.h.diff?r1=1.5&r2=1.6&f=u



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