]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Don't forget to relock the TTY after uiomove() returns an error.
authorEd Schouten <ed@FreeBSD.org>
Wed, 12 Nov 2008 09:04:44 +0000 (09:04 +0000)
committerEd Schouten <ed@FreeBSD.org>
Wed, 12 Nov 2008 09:04:44 +0000 (09:04 +0000)
commit87fe0fa84f764c307c8a999f7a44262403b16d36
treee71439bf408e0357648d3205d3c841d9dbf73072
parentd1340303b9b7c07ba8d64baf8579e4dbb28e7bdd
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