PERFORCE change 39381 for review
Sam Leffler
sam at FreeBSD.org
Wed Oct 8 15:42:32 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=39381
Change 39381 by sam at sam_ebb on 2003/10/08 15:42:19
correct locking issues in nd6_lookup; this stuff is still
very far from right (won't get to it until locking all ipv6)
Affected files ...
.. //depot/projects/netperf/sys/netinet6/nd6.c#8 edit
Differences ...
==== //depot/projects/netperf/sys/netinet6/nd6.c#8 (text+ko) ====
@@ -822,7 +822,6 @@
RTFREE_LOCKED(rt);
rt = 0;
}
- RT_UNLOCK(rt);
}
if (!rt) {
if (create && ifp) {
@@ -859,6 +858,7 @@
ip6_sprintf(addr6), e);
if (rt == NULL)
return (NULL);
+ RT_LOCK(rt);
if (rt->rt_llinfo) {
struct llinfo_nd6 *ln =
(struct llinfo_nd6 *)rt->rt_llinfo;
@@ -867,6 +867,7 @@
} else
return (NULL);
}
+ RT_LOCK_ASSERT(rt);
rt->rt_refcnt--;
/*
* Validation for the entry.
@@ -888,8 +889,10 @@
ip6_sprintf(addr6), ifp ? if_name(ifp) : "unspec");
/* xxx more logs... kazu */
}
+ RT_UNLOCK(rt);
return (NULL);
}
+ RT_UNLOCK(rt); /* XXX not ready to return rt locked */
return (rt);
}
More information about the p4-projects
mailing list