From owner-svn-src-head@FreeBSD.ORG Thu Oct 18 13:57:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5CA56E13; Thu, 18 Oct 2012 13:57:25 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40F3B8FC12; Thu, 18 Oct 2012 13:57:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9IDvPTg051694; Thu, 18 Oct 2012 13:57:25 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9IDvOtC051673; Thu, 18 Oct 2012 13:57:24 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210181357.q9IDvOtC051673@svn.freebsd.org> From: Andre Oppermann Date: Thu, 18 Oct 2012 13:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241686 - in head/sys: net netgraph netgraph/atm/ccatm netgraph/atm/sscfu netgraph/atm/sscop netgraph/atm/uni netinet netinet6 netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 13:57:25 -0000 Author: andre Date: Thu Oct 18 13:57:24 2012 New Revision: 241686 URL: http://svn.freebsd.org/changeset/base/241686 Log: Mechanically remove the last stray remains of spl* calls from net*/*. They have been Noop's for a long time now. Modified: head/sys/net/if.c head/sys/net/if_ef.c head/sys/net/if_gre.c head/sys/net/if_spppsubr.c head/sys/net/if_var.h head/sys/net/rtsock.c head/sys/netgraph/atm/ccatm/ng_ccatm.c head/sys/netgraph/atm/sscfu/ng_sscfu.c head/sys/netgraph/atm/sscop/ng_sscop.c head/sys/netgraph/atm/uni/ng_uni.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_ether.c head/sys/netgraph/ng_fec.c head/sys/netgraph/ng_gif.c head/sys/netgraph/ng_ksocket.c head/sys/netgraph/ng_source.c head/sys/netinet/ip_ipsec.c head/sys/netinet6/in6.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/udp6_usrreq.c head/sys/netipsec/key.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/net/if.c Thu Oct 18 13:57:24 2012 (r241686) @@ -691,12 +691,9 @@ static void if_attachdomain(void *dummy) { struct ifnet *ifp; - int s; - s = splnet(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) if_attachdomain1(ifp); - splx(s); } SYSINIT(domainifattach, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_SECOND, if_attachdomain, NULL); @@ -705,21 +702,15 @@ static void if_attachdomain1(struct ifnet *ifp) { struct domain *dp; - int s; - - s = splnet(); /* * Since dp->dom_ifattach calls malloc() with M_WAITOK, we * cannot lock ifp->if_afdata initialization, entirely. */ - if (IF_AFDATA_TRYLOCK(ifp) == 0) { - splx(s); + if (IF_AFDATA_TRYLOCK(ifp) == 0) return; - } if (ifp->if_afdata_initialized >= domain_init_status) { IF_AFDATA_UNLOCK(ifp); - splx(s); printf("if_attachdomain called more than once on %s\n", ifp->if_xname); return; @@ -734,8 +725,6 @@ if_attachdomain1(struct ifnet *ifp) ifp->if_afdata[dp->dom_family] = (*dp->dom_ifattach)(ifp); } - - splx(s); } /* @@ -1825,7 +1814,6 @@ link_rtrequest(int cmd, struct rtentry * /* * Mark an interface down and notify protocols of * the transition. - * NOTE: must be called at splnet or eqivalent. */ static void if_unroute(struct ifnet *ifp, int flag, int fam) @@ -1849,7 +1837,6 @@ if_unroute(struct ifnet *ifp, int flag, /* * Mark an interface up and notify protocols of * the transition. - * NOTE: must be called at splnet or eqivalent. */ static void if_route(struct ifnet *ifp, int flag, int fam) @@ -1935,7 +1922,6 @@ do_link_state_change(void *arg, int pend /* * Mark an interface down and notify protocols of * the transition. - * NOTE: must be called at splnet or eqivalent. */ void if_down(struct ifnet *ifp) @@ -1947,7 +1933,6 @@ if_down(struct ifnet *ifp) /* * Mark an interface up and notify protocols of * the transition. - * NOTE: must be called at splnet or eqivalent. */ void if_up(struct ifnet *ifp) @@ -2150,14 +2135,10 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, /* Smart drivers twiddle their own routes */ } else if (ifp->if_flags & IFF_UP && (new_flags & IFF_UP) == 0) { - int s = splimp(); if_down(ifp); - splx(s); } else if (new_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) { - int s = splimp(); if_up(ifp); - splx(s); } /* See if permanently promiscuous mode bit is about to flip */ if ((ifp->if_flags ^ new_flags) & IFF_PPROMISC) { @@ -2605,11 +2586,8 @@ ifioctl(struct socket *so, u_long cmd, c if ((oif_flags ^ ifp->if_flags) & IFF_UP) { #ifdef INET6 - if (ifp->if_flags & IFF_UP) { - int s = splimp(); + if (ifp->if_flags & IFF_UP) in6_if_up(ifp); - splx(s); - } #endif } if_rele(ifp); Modified: head/sys/net/if_ef.c ============================================================================== --- head/sys/net/if_ef.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/net/if_ef.c Thu Oct 18 13:57:24 2012 (r241686) @@ -151,14 +151,10 @@ static int ef_detach(struct efnet *sc) { struct ifnet *ifp = sc->ef_ifp; - int s; - - s = splimp(); ether_ifdetach(ifp); if_free(ifp); - splx(s); return 0; } @@ -172,11 +168,10 @@ ef_ioctl(struct ifnet *ifp, u_long cmd, { struct efnet *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr*)data; - int s, error; + int error; EFDEBUG("IOCTL %ld for %s\n", cmd, ifp->if_xname); error = 0; - s = splimp(); switch (cmd) { case SIOCSIFFLAGS: error = 0; @@ -193,7 +188,6 @@ ef_ioctl(struct ifnet *ifp, u_long cmd, error = ether_ioctl(ifp, cmd, data); break; } - splx(s); return error; } Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/net/if_gre.c Thu Oct 18 13:57:24 2012 (r241686) @@ -518,7 +518,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, struct if_laddrreq *lifr = (struct if_laddrreq *)data; struct in_aliasreq *aifr = (struct in_aliasreq *)data; struct gre_softc *sc = ifp->if_softc; - int s; struct sockaddr_in si; struct sockaddr *sa = NULL; int error, adj; @@ -528,7 +527,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, error = 0; adj = 0; - s = splnet(); switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; @@ -848,7 +846,6 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, break; } - splx(s); return (error); } Modified: head/sys/net/if_spppsubr.c ============================================================================== --- head/sys/net/if_spppsubr.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/net/if_spppsubr.c Thu Oct 18 13:57:24 2012 (r241686) @@ -791,13 +791,12 @@ sppp_output(struct ifnet *ifp, struct mb struct sppp *sp = IFP2SP(ifp); struct ppp_header *h; struct ifqueue *ifq = NULL; - int s, error, rv = 0; + int error, rv = 0; #ifdef INET int ipproto = PPP_IP; #endif int debug = ifp->if_flags & IFF_DEBUG; - s = splimp(); SPPP_LOCK(sp); if (!(ifp->if_flags & IFF_UP) || @@ -808,7 +807,6 @@ sppp_output(struct ifnet *ifp, struct mb #endif m_freem (m); SPPP_UNLOCK(sp); - splx (s); return (ENETDOWN); } @@ -832,9 +830,7 @@ sppp_output(struct ifnet *ifp, struct mb * to start LCP for it. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; - splx(s); lcp.Open(sp); - s = splimp(); } #ifdef INET @@ -858,7 +854,6 @@ sppp_output(struct ifnet *ifp, struct mb { m_freem(m); SPPP_UNLOCK(sp); - splx(s); if(ip->ip_p == IPPROTO_TCP) return(EADDRNOTAVAIL); else @@ -903,7 +898,6 @@ sppp_output(struct ifnet *ifp, struct mb default: m_freem(m); SPPP_UNLOCK(sp); - splx(s); return (EINVAL); } } @@ -933,7 +927,6 @@ nobufs: if (debug) SPP_ARGS(ifp)); ++ifp->if_oerrors; SPPP_UNLOCK(sp); - splx (s); return (ENOBUFS); } /* @@ -1000,7 +993,6 @@ nobufs: if (debug) m_freem (m); ++ifp->if_oerrors; SPPP_UNLOCK(sp); - splx (s); return (EAFNOSUPPORT); } @@ -1016,11 +1008,9 @@ out: if (error) { ++ifp->if_oerrors; SPPP_UNLOCK(sp); - splx (s); return (rv? rv: ENOBUFS); } SPPP_UNLOCK(sp); - splx (s); /* * Unlike in sppp_input(), we can always bump the timestamp * here since sppp_output() is only called on behalf of @@ -1137,14 +1127,12 @@ int sppp_isempty(struct ifnet *ifp) { struct sppp *sp = IFP2SP(ifp); - int empty, s; + int empty; - s = splimp(); SPPP_LOCK(sp); empty = !sp->pp_fastq.ifq_head && !sp->pp_cpq.ifq_head && !SP2IFP(sp)->if_snd.ifq_head; SPPP_UNLOCK(sp); - splx(s); return (empty); } @@ -1156,9 +1144,7 @@ sppp_dequeue(struct ifnet *ifp) { struct sppp *sp = IFP2SP(ifp); struct mbuf *m; - int s; - s = splimp(); SPPP_LOCK(sp); /* * Process only the control protocol queue until we have at @@ -1175,7 +1161,6 @@ sppp_dequeue(struct ifnet *ifp) IF_DEQUEUE (&SP2IFP(sp)->if_snd, m); } SPPP_UNLOCK(sp); - splx(s); return m; } @@ -1187,9 +1172,7 @@ sppp_pick(struct ifnet *ifp) { struct sppp *sp = IFP2SP(ifp); struct mbuf *m; - int s; - s = splimp (); SPPP_LOCK(sp); m = sp->pp_cpq.ifq_head; @@ -1200,7 +1183,6 @@ sppp_pick(struct ifnet *ifp) if ((m = sp->pp_fastq.ifq_head) == NULL) m = SP2IFP(sp)->if_snd.ifq_head; SPPP_UNLOCK(sp); - splx (s); return (m); } @@ -1212,9 +1194,8 @@ sppp_ioctl(struct ifnet *ifp, IOCTL_CMD_ { struct ifreq *ifr = (struct ifreq*) data; struct sppp *sp = IFP2SP(ifp); - int s, rv, going_up, going_down, newmode; + int rv, going_up, going_down, newmode; - s = splimp(); SPPP_LOCK(sp); rv = 0; switch (cmd) { @@ -1320,7 +1301,6 @@ sppp_ioctl(struct ifnet *ifp, IOCTL_CMD_ rv = ENOTTY; } SPPP_UNLOCK(sp); - splx(s); return rv; } @@ -2070,9 +2050,7 @@ static void sppp_to_event(const struct cp *cp, struct sppp *sp) { STDDCL; - int s; - s = splimp(); SPPP_LOCK(sp); if (debug) log(LOG_DEBUG, SPP_FMT "%s TO(%s) rst_counter = %d\n", @@ -2122,7 +2100,6 @@ sppp_to_event(const struct cp *cp, struc } SPPP_UNLOCK(sp); - splx(s); } /* @@ -4025,7 +4002,7 @@ sppp_chap_input(struct sppp *sp, struct { STDDCL; struct lcp_header *h; - int len, x; + int len; u_char *value, *name, digest[AUTHKEYLEN], dsize; int value_len, name_len; MD5_CTX ctx; @@ -4102,7 +4079,6 @@ sppp_chap_input(struct sppp *sp, struct } log(-1, "\n"); } - x = splimp(); SPPP_LOCK(sp); sp->pp_flags &= ~PP_NEEDAUTH; if (sp->myauth.proto == PPP_CHAP && @@ -4114,11 +4090,9 @@ sppp_chap_input(struct sppp *sp, struct * to network phase. */ SPPP_UNLOCK(sp); - splx(x); break; } SPPP_UNLOCK(sp); - splx(x); sppp_phase_network(sp); break; @@ -4280,9 +4254,7 @@ sppp_chap_TO(void *cookie) { struct sppp *sp = (struct sppp *)cookie; STDDCL; - int s; - s = splimp(); SPPP_LOCK(sp); if (debug) log(LOG_DEBUG, SPP_FMT "chap TO(%s) rst_counter = %d\n", @@ -4313,14 +4285,13 @@ sppp_chap_TO(void *cookie) } SPPP_UNLOCK(sp); - splx(s); } static void sppp_chap_tlu(struct sppp *sp) { STDDCL; - int i, x; + int i; i = 0; sp->rst_counter[IDX_CHAP] = sp->lcp.max_configure; @@ -4351,7 +4322,6 @@ sppp_chap_tlu(struct sppp *sp) log(-1, "re-challenging supressed\n"); } - x = splimp(); SPPP_LOCK(sp); /* indicate to LCP that we need to be closed down */ sp->lcp.protos |= (1 << IDX_CHAP); @@ -4363,11 +4333,9 @@ sppp_chap_tlu(struct sppp *sp) * phase. */ SPPP_UNLOCK(sp); - splx(x); return; } SPPP_UNLOCK(sp); - splx(x); /* * If we are already in phase network, we are done here. This @@ -4436,7 +4404,7 @@ sppp_pap_input(struct sppp *sp, struct m { STDDCL; struct lcp_header *h; - int len, x; + int len; u_char *name, *passwd, mlen; int name_len, passwd_len; @@ -4523,7 +4491,6 @@ sppp_pap_input(struct sppp *sp, struct m } log(-1, "\n"); } - x = splimp(); SPPP_LOCK(sp); sp->pp_flags &= ~PP_NEEDAUTH; if (sp->myauth.proto == PPP_PAP && @@ -4535,11 +4502,9 @@ sppp_pap_input(struct sppp *sp, struct m * to network phase. */ SPPP_UNLOCK(sp); - splx(x); break; } SPPP_UNLOCK(sp); - splx(x); sppp_phase_network(sp); break; @@ -4620,9 +4585,7 @@ sppp_pap_TO(void *cookie) { struct sppp *sp = (struct sppp *)cookie; STDDCL; - int s; - s = splimp(); SPPP_LOCK(sp); if (debug) log(LOG_DEBUG, SPP_FMT "pap TO(%s) rst_counter = %d\n", @@ -4648,7 +4611,6 @@ sppp_pap_TO(void *cookie) } SPPP_UNLOCK(sp); - splx(s); } /* @@ -4675,7 +4637,6 @@ static void sppp_pap_tlu(struct sppp *sp) { STDDCL; - int x; sp->rst_counter[IDX_PAP] = sp->lcp.max_configure; @@ -4683,7 +4644,6 @@ sppp_pap_tlu(struct sppp *sp) log(LOG_DEBUG, SPP_FMT "%s tlu\n", SPP_ARGS(ifp), pap.name); - x = splimp(); SPPP_LOCK(sp); /* indicate to LCP that we need to be closed down */ sp->lcp.protos |= (1 << IDX_PAP); @@ -4695,11 +4655,9 @@ sppp_pap_tlu(struct sppp *sp) * phase. */ SPPP_UNLOCK(sp); - splx(x); return; } SPPP_UNLOCK(sp); - splx(x); sppp_phase_network(sp); } @@ -4837,9 +4795,7 @@ sppp_keepalive(void *dummy) { struct sppp *sp = (struct sppp*)dummy; struct ifnet *ifp = SP2IFP(sp); - int s; - s = splimp(); SPPP_LOCK(sp); /* Keepalive mode disabled or channel down? */ if (! (sp->pp_flags & PP_KEEPALIVE) || @@ -4882,7 +4838,6 @@ sppp_keepalive(void *dummy) } out: SPPP_UNLOCK(sp); - splx(s); callout_reset(&sp->keepalive_callout, hz * 10, sppp_keepalive, (void *)sp); } @@ -4932,7 +4887,7 @@ sppp_get_ip_addrs(struct sppp *sp, u_lon #ifdef INET /* - * Set my IP address. Must be called at splimp. + * Set my IP address. */ static void sppp_set_ip_addr(struct sppp *sp, u_long src) @@ -5049,7 +5004,7 @@ sppp_gen_ip6_addr(struct sppp *sp, struc } /* - * Set my IPv6 address. Must be called at splimp. + * Set my IPv6 address. */ static void sppp_set_ip6_addr(struct sppp *sp, const struct in6_addr *src) Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/net/if_var.h Thu Oct 18 13:57:24 2012 (r241686) @@ -274,7 +274,7 @@ void if_maddr_runlock(struct ifnet *ifp) * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq) * are queues of messages stored on ifqueue structures * (defined above). Entries are added to and deleted from these structures - * by these macros, which should be called with ipl raised to splimp(). + * by these macros. */ #define IF_LOCK(ifq) mtx_lock(&(ifq)->ifq_mtx) #define IF_UNLOCK(ifq) mtx_unlock(&(ifq)->ifq_mtx) Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/net/rtsock.c Thu Oct 18 13:57:24 2012 (r241686) @@ -302,7 +302,7 @@ static int rts_attach(struct socket *so, int proto, struct thread *td) { struct rawcb *rp; - int s, error; + int error; KASSERT(so->so_pcb == NULL, ("rts_attach: so_pcb != NULL")); @@ -311,20 +311,11 @@ rts_attach(struct socket *so, int proto, if (rp == NULL) return ENOBUFS; - /* - * The splnet() is necessary to block protocols from sending - * error notifications (like RTM_REDIRECT or RTM_LOSING) while - * this PCB is extant but incompletely initialized. - * Probably we should try to do more of this work beforehand and - * eliminate the spl. - */ - s = splnet(); so->so_pcb = (caddr_t)rp; so->so_fibnum = td->td_proc->p_fibnum; error = raw_attach(so, proto); rp = sotorawcb(so); if (error) { - splx(s); so->so_pcb = NULL; free(rp, M_PCB); return error; @@ -345,7 +336,6 @@ rts_attach(struct socket *so, int proto, RTSOCK_UNLOCK(); soisconnected(so); so->so_options |= SO_USELOOPBACK; - splx(s); return 0; } Modified: head/sys/netgraph/atm/ccatm/ng_ccatm.c ============================================================================== --- head/sys/netgraph/atm/ccatm/ng_ccatm.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/atm/ccatm/ng_ccatm.c Thu Oct 18 13:57:24 2012 (r241686) @@ -1178,10 +1178,8 @@ ng_ccatm_log(const char *fmt, ...) static int ng_ccatm_mod_event(module_t mod, int event, void *data) { - int s; int error = 0; - s = splnet(); switch (event) { case MOD_LOAD: @@ -1194,6 +1192,5 @@ ng_ccatm_mod_event(module_t mod, int eve error = EOPNOTSUPP; break; } - splx(s); return (error); } Modified: head/sys/netgraph/atm/sscfu/ng_sscfu.c ============================================================================== --- head/sys/netgraph/atm/sscfu/ng_sscfu.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/atm/sscfu/ng_sscfu.c Thu Oct 18 13:57:24 2012 (r241686) @@ -587,10 +587,8 @@ sscfu_verbose(struct sscfu *sscfu, void static int ng_sscfu_mod_event(module_t mod, int event, void *data) { - int s; int error = 0; - s = splnet(); switch (event) { case MOD_LOAD: @@ -603,6 +601,5 @@ ng_sscfu_mod_event(module_t mod, int eve error = EOPNOTSUPP; break; } - splx(s); return (error); } Modified: head/sys/netgraph/atm/sscop/ng_sscop.c ============================================================================== --- head/sys/netgraph/atm/sscop/ng_sscop.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/atm/sscop/ng_sscop.c Thu Oct 18 13:57:24 2012 (r241686) @@ -861,10 +861,8 @@ sscop_send_manage(struct sscop *sscop, v static int ng_sscop_mod_event(module_t mod, int event, void *data) { - int s; int error = 0; - s = splnet(); switch (event) { case MOD_LOAD: @@ -877,6 +875,5 @@ ng_sscop_mod_event(module_t mod, int eve error = EOPNOTSUPP; break; } - splx(s); return (error); } Modified: head/sys/netgraph/atm/uni/ng_uni.c ============================================================================== --- head/sys/netgraph/atm/uni/ng_uni.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/atm/uni/ng_uni.c Thu Oct 18 13:57:24 2012 (r241686) @@ -907,10 +907,8 @@ ng_uni_free(enum unimem type, void *ptr, static int ng_uni_mod_event(module_t mod, int event, void *data) { - int s; int error = 0; - s = splnet(); switch(event) { case MOD_LOAD: @@ -925,6 +923,5 @@ ng_uni_mod_event(module_t mod, int event error = EOPNOTSUPP; break; } - splx(s); return (error); } Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/ng_eiface.c Thu Oct 18 13:57:24 2012 (r241686) @@ -132,12 +132,11 @@ ng_eiface_ioctl(struct ifnet *ifp, u_lon { const priv_p priv = (priv_p)ifp->if_softc; struct ifreq *const ifr = (struct ifreq *)data; - int s, error = 0; + int error = 0; #ifdef DEBUG ng_eiface_print_ioctl(ifp, command, data); #endif - s = splimp(); switch (command) { /* These two are mostly handled at a higher layer */ @@ -193,7 +192,6 @@ ng_eiface_ioctl(struct ifnet *ifp, u_lon error = EINVAL; break; } - splx(s); return (error); } @@ -202,14 +200,9 @@ ng_eiface_init(void *xsc) { priv_p sc = xsc; struct ifnet *ifp = sc->ifp; - int s; - - s = splimp(); ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - - splx(s); } /* Modified: head/sys/netgraph/ng_ether.c ============================================================================== --- head/sys/netgraph/ng_ether.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/ng_ether.c Thu Oct 18 13:57:24 2012 (r241686) @@ -220,8 +220,6 @@ NETGRAPH_INIT(ether, &ng_ether_typestruc /* * Handle a packet that has come in on an interface. We get to * look at it here before any upper layer protocols do. - * - * NOTE: this function will get called at splimp() */ static void ng_ether_input(struct ifnet *ifp, struct mbuf **mp) @@ -239,8 +237,6 @@ ng_ether_input(struct ifnet *ifp, struct /* * Handle a packet that has come in on an interface, and which * does not match any of our known protocols (an ``orphan''). - * - * NOTE: this function will get called at splimp() */ static void ng_ether_input_orphan(struct ifnet *ifp, struct mbuf *m) @@ -759,9 +755,7 @@ static int ng_ether_mod_event(module_t mod, int event, void *data) { int error = 0; - int s; - s = splnet(); switch (event) { case MOD_LOAD: @@ -802,7 +796,6 @@ ng_ether_mod_event(module_t mod, int eve error = EOPNOTSUPP; break; } - splx(s); return (error); } Modified: head/sys/netgraph/ng_fec.c ============================================================================== --- head/sys/netgraph/ng_fec.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/ng_fec.c Thu Oct 18 13:57:24 2012 (r241686) @@ -753,7 +753,7 @@ static int ng_fec_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct ifreq *const ifr = (struct ifreq *) data; - int s, error = 0; + int error = 0; struct ng_fec_private *priv; struct ng_fec_bundle *b; @@ -763,7 +763,6 @@ ng_fec_ioctl(struct ifnet *ifp, u_long c #ifdef DEBUG ng_fec_print_ioctl(ifp, command, data); #endif - s = splimp(); switch (command) { /* These two are mostly handled at a higher layer */ @@ -843,7 +842,6 @@ ng_fec_ioctl(struct ifnet *ifp, u_long c error = EINVAL; break; } - (void) splx(s); return (error); } Modified: head/sys/netgraph/ng_gif.c ============================================================================== --- head/sys/netgraph/ng_gif.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/ng_gif.c Thu Oct 18 13:57:24 2012 (r241686) @@ -163,8 +163,6 @@ NETGRAPH_INIT(gif, &ng_gif_typestruct); /* * Handle a packet that has come in on an interface. We get to * look at it here before any upper layer protocols do. - * - * NOTE: this function will get called at splimp() */ static void ng_gif_input(struct ifnet *ifp, struct mbuf **mp, int af) @@ -181,8 +179,6 @@ ng_gif_input(struct ifnet *ifp, struct m /* * Handle a packet that has come in on an interface, and which * does not match any of our known protocols (an ``orphan''). - * - * NOTE: this function will get called at splimp() */ static void ng_gif_input_orphan(struct ifnet *ifp, struct mbuf *m, int af) @@ -203,8 +199,6 @@ ng_gif_input_orphan(struct ifnet *ifp, s /* * Handle a packet that has come in on a gif interface. * Attach the address family to the mbuf for later use. - * - * NOTE: this function will get called at splimp() */ static void ng_gif_input2(node_p node, struct mbuf **mp, int af) @@ -543,9 +537,7 @@ ng_gif_mod_event(module_t mod, int event VNET_ITERATOR_DECL(vnet_iter); struct ifnet *ifp; int error = 0; - int s; - s = splnet(); switch (event) { case MOD_LOAD: @@ -597,7 +589,6 @@ ng_gif_mod_event(module_t mod, int event error = EOPNOTSUPP; break; } - splx(s); return (error); } Modified: head/sys/netgraph/ng_ksocket.c ============================================================================== --- head/sys/netgraph/ng_ksocket.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/ng_ksocket.c Thu Oct 18 13:57:24 2012 (r241686) @@ -1045,9 +1045,7 @@ ng_ksocket_incoming2(node_p node, hook_p struct mbuf *m; struct ng_mesg *response; struct uio auio; - int s, flags, error; - - s = splnet(); + int flags, error; /* so = priv->so; *//* XXX could have derived this like so */ KASSERT(so == priv->so, ("%s: wrong socket", __func__)); @@ -1094,10 +1092,8 @@ ng_ksocket_incoming2(node_p node, hook_p * the hook gets created and is connected, this upcall function * will be called again. */ - if (priv->hook == NULL) { - splx(s); + if (priv->hook == NULL) return; - } /* Read and forward available mbuf's */ auio.uio_td = NULL; @@ -1165,7 +1161,6 @@ sendit: /* Forward data with optional p } priv->flags |= KSF_EOFSEEN; } - splx(s); } /* Modified: head/sys/netgraph/ng_source.c ============================================================================== --- head/sys/netgraph/ng_source.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netgraph/ng_source.c Thu Oct 18 13:57:24 2012 (r241686) @@ -608,7 +608,6 @@ static int ng_source_store_output_ifp(sc_p sc, char *ifname) { struct ifnet *ifp; - int s; ifp = ifunit(ifname); @@ -624,13 +623,11 @@ ng_source_store_output_ifp(sc_p sc, char * interface with small packets. * XXX we should restore the original value at stop or disconnect */ - s = splimp(); /* XXX is this required? */ if (ifp->if_snd.ifq_maxlen < NG_SOURCE_DRIVER_IFQ_MAXLEN) { printf("ng_source: changing ifq_maxlen from %d to %d\n", ifp->if_snd.ifq_maxlen, NG_SOURCE_DRIVER_IFQ_MAXLEN); ifp->if_snd.ifq_maxlen = NG_SOURCE_DRIVER_IFQ_MAXLEN; } - splx(s); #endif return (0); } Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netinet/ip_ipsec.c Thu Oct 18 13:57:24 2012 (r241686) @@ -117,10 +117,9 @@ ip_ipsec_fwd(struct mbuf *m) struct m_tag *mtag; struct tdb_ident *tdbi; struct secpolicy *sp; - int s, error; + int error; mtag = m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL); - s = splnet(); if (mtag != NULL) { tdbi = (struct tdb_ident *)(mtag + 1); sp = ipsec_getpolicy(tdbi, IPSEC_DIR_INBOUND); @@ -129,7 +128,6 @@ ip_ipsec_fwd(struct mbuf *m) IP_FORWARDING, &error); } if (sp == NULL) { /* NB: can happen if error */ - splx(s); /*XXX error stat???*/ DPRINTF(("ip_input: no SP for forwarding\n")); /*XXX*/ return 1; @@ -140,7 +138,6 @@ ip_ipsec_fwd(struct mbuf *m) */ error = ipsec_in_reject(sp, m); KEY_FREESP(&sp); - splx(s); if (error) { IPSTAT_INC(ips_cantforward); return 1; @@ -164,7 +161,7 @@ ip_ipsec_input(struct mbuf *m) struct m_tag *mtag; struct tdb_ident *tdbi; struct secpolicy *sp; - int s, error; + int error; /* * enforce IPsec policy checking if we are seeing last header. * note that we do not visit this with protocols with pcb layer @@ -178,7 +175,6 @@ ip_ipsec_input(struct mbuf *m) * packet is returned to the ip input queue for delivery. */ mtag = m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL); - s = splnet(); if (mtag != NULL) { tdbi = (struct tdb_ident *)(mtag + 1); sp = ipsec_getpolicy(tdbi, IPSEC_DIR_INBOUND); @@ -198,7 +194,6 @@ ip_ipsec_input(struct mbuf *m) DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/ return 1; } - splx(s); if (error) return 1; } @@ -267,7 +262,6 @@ ip_ipsec_output(struct mbuf **m, struct struct ip *ip = mtod(*m, struct ip *); struct tdb_ident *tdbi; struct m_tag *mtag; - int s; /* * Check the security policy (SP) for the packet and, if * required, do IPsec-related processing. There are two @@ -278,7 +272,6 @@ ip_ipsec_output(struct mbuf **m, struct * the lookup and related policy checking. */ mtag = m_tag_find(*m, PACKET_TAG_IPSEC_PENDING_TDB, NULL); - s = splnet(); if (mtag != NULL) { tdbi = (struct tdb_ident *)(mtag + 1); sp = ipsec_getpolicy(tdbi, IPSEC_DIR_OUTBOUND); @@ -327,7 +320,6 @@ ip_ipsec_output(struct mbuf **m, struct * done: below. */ KEY_FREESP(&sp), sp = NULL; - splx(s); goto done; } } @@ -372,10 +364,8 @@ ip_ipsec_output(struct mbuf **m, struct */ if (*error == ENOENT) *error = 0; - splx(s); goto reinjected; } else { /* sp == NULL */ - splx(s); if (*error != 0) { /* Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Thu Oct 18 13:46:26 2012 (r241685) +++ head/sys/netinet6/in6.c Thu Oct 18 13:57:24 2012 (r241686) @@ -995,7 +995,6 @@ cleanup: * Update parameters of an IPv6 interface address. * If necessary, a new entry is created and linked into address chains. * This function is separated from in6_control(). - * XXX: should this be performed under splnet()? */ int in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra, @@ -1522,7 +1521,6 @@ in6_purgeaddr(struct ifaddr *ifa) static void in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) { - int s = splnet(); IF_ADDR_WLOCK(ifp); TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); @@ -1560,7 +1558,6 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st pfxlist_onlink_check(); } ifa_free(&ia->ia_ifa); /* in6_ifaddrhead */ - splx(s); } void @@ -1856,7 +1853,6 @@ in6_ifinit(struct ifnet *ifp, struct in6 struct sockaddr_in6 *sin6, int newhost) { int error = 0, plen, ifacount = 0; - int s = splimp(); struct ifaddr *ifa; /* @@ -1876,12 +1872,9 @@ in6_ifinit(struct ifnet *ifp, struct in6 if (ifacount <= 1 && ifp->if_ioctl) { error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia); - if (error) { - splx(s); + if (error) return (error); - } } - splx(s); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***