Date: Fri, 23 May 2008 16:46:27 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern tty.c Message-ID: <200805231646.m4NGkRlG000567@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2008-05-23 16:46:27 UTC FreeBSD src repository Modified files: sys/kern tty.c Log: The dev_refthread() in the tty_gettp() may fail, because Giant is taken in the giant_trick routines after the dev_refthread increments the si_threadcount. Remove assert, do not perform dev_relthread() for failed dev_refthread(), and handle failure in the tty_gettp() callers (cdevsw tty methods). Before kern_conf.c 1.210 and 1.211, the kernel usually paniced in the giant_trick routines dereferencing NULL cdevsw, not taking this fault. Reported by: Vince Hoffman <jhary unsane co uk> Debugging help and tested by: pho Reviewed by: jhb MFC after: 1 week Revision Changes Path 1.279 +6 -5 src/sys/kern/tty.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805231646.m4NGkRlG000567>