PERFORCE change 40794 for review

Sam Leffler sam at FreeBSD.org
Wed Oct 29 17:54:24 PST 2003


http://perforce.freebsd.org/chv.cgi?CH=40794

Change 40794 by sam at sam_ebb on 2003/10/29 17:54:03

	conservatively expand scope of locking

Affected files ...

.. //depot/projects/netperf/sys/netinet/in_rmx.c#11 edit

Differences ...

==== //depot/projects/netperf/sys/netinet/in_rmx.c#11 (text+ko) ====

@@ -375,6 +375,7 @@
 	struct in_ifadown_arg *ap = xap;
 	struct rtentry *rt = (struct rtentry *)rn;
 
+	RT_LOCK(rt);
 	if (rt->rt_ifa == ap->ifa &&
 	    (ap->del || !(rt->rt_flags & RTF_STATIC))) {
 		/*
@@ -385,11 +386,11 @@
 		 * the routes that rtrequest() would have in any case,
 		 * so that behavior is not needed there.
 		 */
-		RT_LOCK(rt);
 		rt->rt_flags &= ~(RTF_CLONING | RTF_PRCLONING);
 		rtexpunge(rt);
 		RTFREE_LOCKED(rt);
-	}
+	} else
+		RT_UNLOCK(rt);
 	return 0;
 }
 


More information about the p4-projects mailing list