From 1c28691762cbdcc1d4da6d893746e26a7e9ad9e5 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Tue, 20 Dec 2016 12:18:45 +0000 Subject: Kill recursive splsoftnet()/splx() dances in ioctl(2) path. ok rzalamena@ --- sys/net/if_mpe.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sys/net/if_mpe.c') diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index d1c0ad054e0..b16f395bcde 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.55 2016/09/21 07:41:49 mpi Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.56 2016/12/20 12:18:44 mpi Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -270,7 +270,7 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) struct mpe_softc *ifm; struct ifreq *ifr; struct shim_hdr shim; - int s, error = 0; + int error = 0; ifr = (struct ifreq *)data; switch (cmd) { @@ -320,7 +320,6 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (error) break; ifm = ifp->if_softc; - s = splsoftnet(); if (ifm->sc_smpls.smpls_label) { /* remove old MPLS route */ rt_ifa_del(&ifm->sc_ifa, RTF_MPLS, @@ -330,7 +329,6 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifm->sc_smpls.smpls_label = shim.shim_label; error = rt_ifa_add(&ifm->sc_ifa, RTF_MPLS, smplstosa(&ifm->sc_smpls)); - splx(s); if (error) { ifm->sc_smpls.smpls_label = 0; break; @@ -341,10 +339,8 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifm = ifp->if_softc; if (ifr->ifr_rdomainid != ifp->if_rdomain) { if (ifm->sc_smpls.smpls_label) { - s = splsoftnet(); rt_ifa_add(&ifm->sc_ifa, RTF_MPLS, smplstosa(&ifm->sc_smpls)); - splx(s); } } /* return with ENOTTY so that the parent handler finishes */ -- cgit v1.2.3