[net.bugs.4bsd] 4.2BSD tty.c bug

hosking@convex.UUCP (06/16/84)

#N:convex:33500006:000:510
convex!hosking    Jun 15 00:25:00 1984

In 4.2BSD tty.c, routine "ttwrite", there appears to be a bug with the way
interrupt masking is done.  Assuming you reach "ovhiwat:", interrupts are
masked with s = spl5();.  However, there are at least 2 ways to leave this
code without a corresponding splx(s).  Oops!

ovhiwat:
	s = spl5();
	.
	.
	.
	if (tp->t_state&TS_NBIO) {
		if (uio->uio_resid == cnt)
			return (EWOULDBLOCK);	<----------
		return (0);			<----------
	}
					Doug Hosking
					Convex Computer Corp.
					..{allegra, ihnp4}!convex!hosking