Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2012 16:09:33 +0200
From:      Andre Oppermann <oppermann@networx.ch>
To:        Vijay Singh <vijju.singh@gmail.com>
Cc:        net@freebsd.org
Subject:   Re: A small cleanup patch
Message-ID:  <50800D9D.1090705@networx.ch>
In-Reply-To: <CALCNsJTWhVaV-2U1J5EtN2-6iyi_CGgCCrBVZ3VO1H0JLUKfvQ@mail.gmail.com>
References:  <CALCNsJTWhVaV-2U1J5EtN2-6iyi_CGgCCrBVZ3VO1H0JLUKfvQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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"
>
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50800D9D.1090705>