Module Name: src Committed By: knakahara Date: Wed Oct 16 06:53:34 UTC 2019
Modified Files: src/sys/net: if_gre.c if_l2tp.c if_tap.c Log Message: Fix missing kpreempt_disable() before softint_schedule() like if_vmx.c:r1.51. To generate a diff of this commit: cvs rdiff -u -r1.175 -r1.176 src/sys/net/if_gre.c cvs rdiff -u -r1.39 -r1.40 src/sys/net/if_l2tp.c cvs rdiff -u -r1.113 -r1.114 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/net/if_gre.c diff -u src/sys/net/if_gre.c:1.175 src/sys/net/if_gre.c:1.176 --- src/sys/net/if_gre.c:1.175 Fri Apr 26 11:51:56 2019 +++ src/sys/net/if_gre.c Wed Oct 16 06:53:34 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.176 2019/10/16 06:53:34 knakahara 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.176 2019/10/16 06:53:34 knakahara 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.39 src/sys/net/if_l2tp.c:1.40 --- src/sys/net/if_l2tp.c:1.39 Thu Sep 19 06:09:52 2019 +++ src/sys/net/if_l2tp.c Wed Oct 16 06:53:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_l2tp.c,v 1.39 2019/09/19 06:09:52 knakahara Exp $ */ +/* $NetBSD: if_l2tp.c,v 1.40 2019/10/16 06:53:34 knakahara 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.39 2019/09/19 06:09:52 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.40 2019/10/16 06:53:34 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -673,7 +673,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.114 --- src/sys/net/if_tap.c:1.113 Wed May 29 10:07:30 2019 +++ src/sys/net/if_tap.c Wed Oct 16 06:53:34 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.114 2019/10/16 06:53:34 knakahara 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.114 2019/10/16 06:53:34 knakahara 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); }