summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2014-02-10 15:23:40 +0000
committerae <ae@FreeBSD.org>2014-02-10 15:23:40 +0000
commit44aad33d558d1db0c082ad7a05b503033a0d0de9 (patch)
tree29c68c90b5b8f92c5ef24df025390a5713638a59 /sys/netinet6
parentcc4ebc4422fb7ded7f6515852213f028df2d0ce8 (diff)
downloadFreeBSD-src-44aad33d558d1db0c082ad7a05b503033a0d0de9.zip
FreeBSD-src-44aad33d558d1db0c082ad7a05b503033a0d0de9.tar.gz
MFC r261400:
Take exclusive lock only when lle isn't NULL. We don't need write access to lle in most cases. MFC r261583: Unlock entry before retry. Sponsored by: Yandex LLC
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 3620623..00ee02a 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1888,7 +1888,7 @@ nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
* or an anycast address(i.e. not a multicast).
*/
- flags = ((m != NULL) || (lle != NULL)) ? LLE_EXCLUSIVE : 0;
+ flags = (lle != NULL) ? LLE_EXCLUSIVE : 0;
if (ln == NULL) {
retry:
IF_AFDATA_RLOCK(ifp);
@@ -1924,6 +1924,7 @@ nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
ln->ln_state < ND6_LLINFO_REACHABLE) {
if ((flags & LLE_EXCLUSIVE) == 0) {
flags |= LLE_EXCLUSIVE;
+ LLE_RUNLOCK(ln);
goto retry;
}
ln->ln_state = ND6_LLINFO_STALE;
OpenPOWER on IntegriCloud