HEADS DOWN: MPSAFE TTY layer integrated

Ed Schouten ed at 80386.nl
Wed Aug 27 19:38:21 UTC 2008


Hello Tor,

* Tor Egge <Tor.Egge at cvsup.no.freebsd.org> wrote:
> The problem seems to be caused by a bad return statement inside ttyil_ioctl()
> for the TIOCSETA case.
> 
> - Tor Egge
> 

> Index: sys/kern/tty.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/kern/tty.c,v
> retrieving revision 1.284
> diff -u -r1.284 tty.c
> --- sys/kern/tty.c	22 Aug 2008 21:27:37 -0000	1.284
> +++ sys/kern/tty.c	23 Aug 2008 22:00:31 -0000
> @@ -709,7 +709,6 @@
>  		if (error)
>  			break;
>  		bcopy(data, dev->si_drv2, sizeof(struct termios));
> -		return (0);
>  		break;
>  	case TIOCGETD:
>  		*(int *)data = TTYDISC;

Ouch. That looks like a rather painful bug. I've got a kernels running
with WITNESS/INVARIANTS/the whole lot enabled and I can confirm this was
the issue. It should be fixed as of r182296.

Thanks!

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080827/a6592ef5/attachment.pgp


More information about the freebsd-current mailing list