Date: Wed, 29 Oct 2003 14:24:30 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 40785 for review Message-ID: <200310292224.h9TMOU6U061277@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=40785 Change 40785 by sam@sam_ebb on 2003/10/29 14:23:30 correct LOR by using a local variable to hold result instead of holding a lock while calling out of view Affected files ... .. //depot/projects/netperf/sys/netinet6/in6.c#11 edit Differences ... ==== //depot/projects/netperf/sys/netinet6/in6.c#11 (text+ko) ==== @@ -214,14 +214,16 @@ in6_ifaddloop(struct ifaddr *ifa) { struct rtentry *rt; + int need_loop; /* If there is no loopback entry, allocate one. */ rt = rtalloc1(ifa->ifa_addr, 0, 0); - if (rt == NULL || (rt->rt_flags & RTF_HOST) == 0 || - (rt->rt_ifp->if_flags & IFF_LOOPBACK) == 0) - in6_ifloop_request(RTM_ADD, ifa); + need_loop = (rt == NULL || (rt->rt_flags & RTF_HOST) == 0 || + (rt->rt_ifp->if_flags & IFF_LOOPBACK) == 0); if (rt) rtfree(rt); + if (need_loop) + in6_ifloop_request(RTM_ADD, ifa); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310292224.h9TMOU6U061277>