summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2017-05-30 21:57:40 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2017-05-30 21:57:40 +0000
commit1be64d751806901ac8a1c6a7797b44793f666bed (patch)
tree9e17d54f49f709c354e91dbe42176332df5cab27 /sys
parenta6666d02f028c9c6260b6049c4270683d9a98c0e (diff)
remove no longer needed splnet/splx.
ok florian@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_pflow.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c
index 0323ad12542..6af8a72f084 100644
--- a/sys/net/if_pflow.c
+++ b/sys/net/if_pflow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflow.c,v 1.78 2017/05/27 21:44:22 benno Exp $ */
+/* $OpenBSD: if_pflow.c,v 1.79 2017/05/30 21:57:39 benno Exp $ */
/*
* Copyright (c) 2011 Florian Obser <florian@narrans.de>
@@ -279,7 +279,6 @@ pflow_clone_destroy(struct ifnet *ifp)
error = 0;
- s = splnet();
if (timeout_initialized(&sc->sc_tmo))
timeout_del(&sc->sc_tmo);
if (timeout_initialized(&sc->sc_tmo6))
@@ -299,9 +298,10 @@ pflow_clone_destroy(struct ifnet *ifp)
if (sc->sc_flowsrc != NULL)
free(sc->sc_flowsrc, M_DEVBUF, sc->sc_flowsrc->sa_len);
if_detach(ifp);
+ NET_LOCK(s);
SLIST_REMOVE(&pflowif_list, sc, pflow_softc, sc_next);
+ NET_UNLOCK(s);
free(sc, M_DEVBUF, sizeof(*sc));
- splx(s);
return (error);
}
@@ -474,7 +474,7 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct pflow_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
struct pflowreq pflowr;
- int s, error;
+ int error;
switch (cmd) {
case SIOCSIFADDR:
@@ -494,11 +494,9 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
return (EINVAL);
if (ifr->ifr_mtu > MCLBYTES)
ifr->ifr_mtu = MCLBYTES;
- s = splnet();
if (ifr->ifr_mtu < ifp->if_mtu)
pflow_flush(sc);
pflow_setmtu(sc, ifr->ifr_mtu);
- splx(s);
break;
case SIOCGETPFLOW:
@@ -526,9 +524,7 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* XXXSMP breaks atomicity */
rw_exit_write(&netlock);
- s = splnet();
error = pflow_set(sc, &pflowr);
- splx(s);
if (error != 0) {
rw_enter_write(&netlock);
return (error);