Re: HEADS DOWN: MPSAFE TTY layer integrated

From: Ed Schouten <ed_at_80386.nl>
Date: Wed, 27 Aug 2008 21:38:20 +0200
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
> _at__at_ -709,7 +709,6 _at__at_
>  		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/

Received on Wed Aug 27 2008 - 17:38:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:34 UTC