svn commit: r261717 - stable/9/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Mon Feb 10 16:13:46 UTC 2014


Author: ae
Date: Mon Feb 10 16:13:45 2014
New Revision: 261717
URL: http://svnweb.freebsd.org/changeset/base/261717

Log:
  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

Modified:
  stable/9/sys/netinet6/nd6.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet6/nd6.c
==============================================================================
--- stable/9/sys/netinet6/nd6.c	Mon Feb 10 15:23:40 2014	(r261716)
+++ stable/9/sys/netinet6/nd6.c	Mon Feb 10 16:13:45 2014	(r261717)
@@ -1895,7 +1895,7 @@ nd6_output_lle(struct ifnet *ifp, struct
 	 * 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);
@@ -1931,6 +1931,7 @@ nd6_output_lle(struct ifnet *ifp, struct
 	    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;


More information about the svn-src-stable-9 mailing list