Mask netisrs during softtty isrs. This may fix PR 798. SLIP and PPP

line discipline interrupt handlers more or less expect to be called at
spltty() == splimp(), although they have internal splimp()s that are
bogus if this expectation is satisfied.  They are called at splsoftty()
from many tty drivers, so they were not protected from being reentered
from their own netisrs.  They certainly don't expect that but are
apparently remarkably robust if it occurs.  The problem in PR 798 seems
to be caused by pppstart() being reentered and finishing off the output
in progress by following the (stale) sc->sc_outm pointer.  Then the
original pppstart() finds garbage in m2 after MFREE(m, m2).  slstart()
doesn't have internal state like sc_outm so reentry of it probably only
causes out of order and dropped packets.
This commit is contained in:
bde 1995-10-30 17:01:37 +00:00
parent 0bf0712743
commit a98f23d0fb

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: spl.h,v 1.10 1995/08/09 02:39:32 dyson Exp $
* $Id: spl.h,v 1.11 1995/08/26 20:46:43 bde Exp $
*/
#ifndef _MACHINE_IPL_H_
@ -62,9 +62,13 @@
* except SWI_AST_MASK includes SWI_CLOCK_MASK so that softclock() doesn't
* run while other swi handlers are running and timeout routines can call
* swi handlers. Everything includes SWI_AST_MASK so that AST's are masked
* until just before return to user mode.
* until just before return to user mode. SWI_TTY_MASK includes SWI_NET_MASK
* in case tty interrupts are processed at splsofttty() for a tty that is in
* SLIP or PPP line discipline (this is weaker than merging net_imask with
* tty_imask in isa.c - splimp() must mask hard and soft tty interrupts, but
* spltty() apparently only needs to mask soft net interrupts).
*/
#define SWI_TTY_MASK (SWI_TTY_PENDING | SWI_CLOCK_MASK)
#define SWI_TTY_MASK (SWI_TTY_PENDING | SWI_CLOCK_MASK | SWI_NET_MASK)
#define SWI_NET_MASK (SWI_NET_PENDING | SWI_CLOCK_MASK)
#define SWI_CLOCK_MASK (SWI_CLOCK_PENDING | SWI_AST_MASK)
#define SWI_AST_MASK SWI_AST_PENDING