From owner-freebsd-net@FreeBSD.ORG Thu Oct 18 14:09:40 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C01A3A7 for ; Thu, 18 Oct 2012 14:09:40 +0000 (UTC) (envelope-from oppermann@networx.ch) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1758FC0A for ; Thu, 18 Oct 2012 14:09:37 +0000 (UTC) Received: (qmail 13412 invoked from network); 18 Oct 2012 15:48:31 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 18 Oct 2012 15:48:31 -0000 Message-ID: <50800D9D.1090705@networx.ch> Date: Thu, 18 Oct 2012 16:09:33 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Vijay Singh Subject: Re: A small cleanup patch References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 14:09:40 -0000 On 05.10.2012 01:21, Vijay Singh wrote: > Folks, I came up with this while going through the lltable code. Thank you. I just purged a larger number of stray spl* from the net*/* directories. This stuff won't be backported to 9-STABLE though. -- Andre > kong@[/u/vijay/bsd/CODE/cur/sys]# svn diff net/if.c > Index: net/if.c > =================================================================== > --- net/if.c (revision 241169) > +++ net/if.c (working copy) > @@ -691,12 +691,9 @@ > 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,22 +702,17 @@ > 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); > 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", > + log(LOG_WARNING, "if_attachdomain called more than once on %s\n", > ifp->if_xname); > return; > } > @@ -734,8 +726,6 @@ > ifp->if_afdata[dp->dom_family] = > (*dp->dom_ifattach)(ifp); > } > - > - splx(s); > } > > /* > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >