summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-10-30 17:01:37 +0000
committerbde <bde@FreeBSD.org>1995-10-30 17:01:37 +0000
commit4e3dff47cf0bb897275729f65be1fef778baf26f (patch)
treef1840529e319ca94acc543c867995c42109eaa7e
parentfd4f943ba17e254d0c7a8e1aba3aca3ba27b0b1c (diff)
downloadFreeBSD-src-4e3dff47cf0bb897275729f65be1fef778baf26f.zip
FreeBSD-src-4e3dff47cf0bb897275729f65be1fef778baf26f.tar.gz
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.
-rw-r--r--sys/i386/include/spl.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/i386/include/spl.h b/sys/i386/include/spl.h
index 5c4e49a..b39dee0 100644
--- a/sys/i386/include/spl.h
+++ b/sys/i386/include/spl.h
@@ -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
OpenPOWER on IntegriCloud