Module Name:    src
Committed By:   martin
Date:           Fri Nov  1 09:34:27 UTC 2019

Modified Files:
        src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c
        src/sys/net [netbsd-9]: if_gre.c if_l2tp.c if_tap.c

Log Message:
Pull up following revision(s) (requested by knakahara in ticket #387):

        sys/net/if_gre.c: revision 1.176
        sys/net/if_l2tp.c: revision 1.40
        sys/dev/pci/ixgbe/ix_txrx.c: revision 1.56
        sys/net/if_tap.c: revision 1.114

Fix missing kpreempt_disable() before softint_schedule() like if_vmx.c:r1.51.


To generate a diff of this commit:
cvs rdiff -u -r1.54.2.1 -r1.54.2.2 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.175 -r1.175.2.1 src/sys/net/if_gre.c
cvs rdiff -u -r1.35.2.1 -r1.35.2.2 src/sys/net/if_l2tp.c
cvs rdiff -u -r1.113 -r1.113.2.1 src/sys/net/if_tap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.1 src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.2
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.1	Thu Sep  5 09:11:03 2019
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Nov  1 09:34:27 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.54.2.1 2019/09/05 09:11:03 martin Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.54.2.2 2019/11/01 09:34:27 martin Exp $ */
 
 /******************************************************************************
 
@@ -266,8 +266,11 @@ ixgbe_mq_start(struct ifnet *ifp, struct
 				    &txr->wq_cookie, curcpu());
 			} else
 				percpu_putref(adapter->txr_wq_enqueued);
-		} else
+		} else {
+			kpreempt_disable();
 			softint_schedule(txr->txr_si);
+			kpreempt_enable();
+		}
 	}
 
 	return (0);

Index: src/sys/net/if_gre.c
diff -u src/sys/net/if_gre.c:1.175 src/sys/net/if_gre.c:1.175.2.1
--- src/sys/net/if_gre.c:1.175	Fri Apr 26 11:51:56 2019
+++ src/sys/net/if_gre.c	Fri Nov  1 09:34:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gre.c,v 1.175 2019/04/26 11:51:56 pgoyette Exp $ */
+/*	$NetBSD: if_gre.c,v 1.175.2.1 2019/11/01 09:34:27 martin Exp $ */
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.175 2019/04/26 11:51:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.175.2.1 2019/11/01 09:34:27 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_atalk.h"
@@ -964,8 +964,11 @@ gre_output(struct ifnet *ifp, struct mbu
 	if ((error = gre_bufq_enqueue(&sc->sc_snd, m)) != 0) {
 		sc->sc_oflow_ev.ev_count++;
 		m_freem(m);
-	} else
+	} else {
+		kpreempt_disable();
 		softint_schedule(sc->sc_si);
+		kpreempt_enable();
+	}
 
 end:
 	if (error)

Index: src/sys/net/if_l2tp.c
diff -u src/sys/net/if_l2tp.c:1.35.2.1 src/sys/net/if_l2tp.c:1.35.2.2
--- src/sys/net/if_l2tp.c:1.35.2.1	Tue Sep 24 03:10:35 2019
+++ src/sys/net/if_l2tp.c	Fri Nov  1 09:34:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_l2tp.c,v 1.35.2.1 2019/09/24 03:10:35 martin Exp $	*/
+/*	$NetBSD: if_l2tp.c,v 1.35.2.2 2019/11/01 09:34:27 martin Exp $	*/
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.35.2.1 2019/09/24 03:10:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.35.2.2 2019/11/01 09:34:27 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -655,7 +655,9 @@ l2tp_start(struct ifnet *ifp)
 	if (var->lv_psrc == NULL || var->lv_pdst == NULL)
 		return;
 
+	kpreempt_disable();
 	softint_schedule(sc->l2tp_si);
+	kpreempt_enable();
 	l2tp_putref_variant(var, &psref);
 }
 

Index: src/sys/net/if_tap.c
diff -u src/sys/net/if_tap.c:1.113 src/sys/net/if_tap.c:1.113.2.1
--- src/sys/net/if_tap.c:1.113	Wed May 29 10:07:30 2019
+++ src/sys/net/if_tap.c	Fri Nov  1 09:34:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.113 2019/05/29 10:07:30 msaitoh Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.113.2.1 2019/11/01 09:34:27 martin Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.113 2019/05/29 10:07:30 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.113.2.1 2019/11/01 09:34:27 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 
@@ -533,8 +533,11 @@ tap_start(struct ifnet *ifp)
 		ifp->if_flags |= IFF_OACTIVE;
 		cv_broadcast(&sc->sc_cv);
 		selnotify(&sc->sc_rsel, 0, 1);
-		if (sc->sc_flags & TAP_ASYNCIO)
+		if (sc->sc_flags & TAP_ASYNCIO) {
+			kpreempt_disable();
 			softint_schedule(sc->sc_sih);
+			kpreempt_enable();
+		}
 	}
 done:
 	mutex_exit(&sc->sc_lock);
@@ -643,8 +646,11 @@ tap_stop(struct ifnet *ifp, int disable)
 	ifp->if_flags &= ~IFF_RUNNING;
 	cv_broadcast(&sc->sc_cv);
 	selnotify(&sc->sc_rsel, 0, 1);
-	if (sc->sc_flags & TAP_ASYNCIO)
+	if (sc->sc_flags & TAP_ASYNCIO) {
+		kpreempt_disable();
 		softint_schedule(sc->sc_sih);
+		kpreempt_enable();
+	}
 	mutex_exit(&sc->sc_lock);
 }
 

Reply via email to