Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2003 15:47:38 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        hackers@freebsd.org
Subject:   suspect spl*() code in syscons.c
Message-ID:  <20031021154738.A9175@xorpc.icir.org>

next in thread | raw e-mail | index | archive | help
Hi,
both -current and -stable have the following snippet of code in
sys/dev/syscons/syscons.c:scclose():

	{
	    ...
	    int s;

	    if (SC_VTY(dev) != SC_CONSOLECTL) {
		...
		s = spltty();
		...
	    }
	    spltty();
	    (*linesw[tp->t_line].l_close)(tp, flag);
	    ttyclose(tp);
	    spl0();
	    return(0);
	}

Note that the omitted code never does any spl*() call, nor it
uses the saved value anymore. Also, i am a bit suspicious about the
spltty()/spl0() sequence.

Can someone explain if this code is correct ?
(I have Bcc-ed the committers involved in writing this code,
maybe they know the answer).

	cheers
	luigi



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