cvs commit: src/sys/kern kern_conf.c

Tor Egge Tor.Egge at cvsup.no.freebsd.org
Wed Oct 18 18:04:54 PDT 2006


> FWIW, reverting revision 1.199 of kern_conf.c locally fixes the
> unkillable xterms, stuck in "devdrn", problem.

destroy_devl() is only stuck in "devdrn" if a thread has called dev_refthread()
but not yet called dev_relthread().  If that thread doesn't sleep forever then
it might write to freed memory on a system where revision 1.199 of kern_conf is
reverted, cf. <URL:http://people.freebsd.org/~pho/stress/log/cons211.html>.

Pseudo ttys need a purge method since there might be races associated with
trying to wake sleeping threads before calling destroy_dev() where a new
thread can go to sleep at the wrong moment.

A related race is devfs_fp_check() versus devfs_reclaim(), allowing for
dev_refthread() to be called with a pointer to freed memory.

- Tor Egge


More information about the cvs-all mailing list