Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Aug 2008 21:38:20 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Tor Egge <Tor.Egge@cvsup.no.freebsd.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: HEADS DOWN: MPSAFE TTY layer integrated
Message-ID:  <20080827193820.GO99951@hoeg.nl>
In-Reply-To: <20080827.192844.45516910.Tor.Egge@cvsup.no.freebsd.org>
References:  <20080827.192844.45516910.Tor.Egge@cvsup.no.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--IScF4dT6yTbCq9Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello Tor,

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

> Index: sys/kern/tty.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> 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 =3D 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!

--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--IScF4dT6yTbCq9Wi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAki1rSwACgkQ52SDGA2eCwWmqwCfV3SdWqRJSBJzFvDr2Xoi+MUL
8KUAn023vENkljdh70woT3omHLjLtrfS
=puv6
-----END PGP SIGNATURE-----

--IScF4dT6yTbCq9Wi--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080827193820.GO99951>