mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-22 15:47:37 +00:00
MFp4: correct locking issues in nd6_lookup
Supported by: FreeBSD Foundation
This commit is contained in:
parent
888c2a3c4e
commit
ba00f0096d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121092
@ -811,7 +811,6 @@ nd6_lookup(addr6, create, ifp)
|
||||
RTFREE_LOCKED(rt);
|
||||
rt = 0;
|
||||
}
|
||||
RT_UNLOCK(rt);
|
||||
}
|
||||
if (!rt) {
|
||||
if (create && ifp) {
|
||||
@ -846,6 +845,7 @@ nd6_lookup(addr6, create, ifp)
|
||||
}
|
||||
if (rt == NULL)
|
||||
return (NULL);
|
||||
RT_LOCK(rt);
|
||||
if (rt->rt_llinfo) {
|
||||
struct llinfo_nd6 *ln =
|
||||
(struct llinfo_nd6 *)rt->rt_llinfo;
|
||||
@ -854,6 +854,7 @@ nd6_lookup(addr6, create, ifp)
|
||||
} else
|
||||
return (NULL);
|
||||
}
|
||||
RT_LOCK_ASSERT(rt);
|
||||
rt->rt_refcnt--;
|
||||
/*
|
||||
* Validation for the entry.
|
||||
@ -877,8 +878,10 @@ nd6_lookup(addr6, create, ifp)
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user