]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Don't forget to relock the TTY after uiomove() returns an error.
authored <ed@FreeBSD.org>
Wed, 12 Nov 2008 09:04:44 +0000 (09:04 +0000)
committered <ed@FreeBSD.org>
Wed, 12 Nov 2008 09:04:44 +0000 (09:04 +0000)
commit172272452387fcd05f0e5fdd7dbeccedd43af76f
treee71439bf408e0357648d3205d3c841d9dbf73072
parentbae7e3ef64374d24a9ddb3967b8d4050f60ea54e
Don't forget to relock the TTY after uiomove() returns an error.

Peter Holm just discovered this funny bug inside the TTY code: if
uiomove() in ttydisc_write() returns an error, we forget to relock the
TTY before jumping out of ttydisc_write(). Fix it by placing
tty_unlock() and tty_lock() around uiomove().

Submitted by: pho
sys/kern/tty_ttydisc.c