cvs commit: src/sys/kern src/sys/sys
Matthew Dillon
dillon at crater.dragonflybsd.org
Mon Sep 13 09:22:54 PDT 2004
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 at 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
More information about the Commits
mailing list