svn commit: r217848 - stable/8/sys/netinet

John Baldwin jhb at FreeBSD.org
Tue Jan 25 20:59:47 UTC 2011


Author: jhb
Date: Tue Jan 25 20:59:47 2011
New Revision: 217848
URL: http://svn.freebsd.org/changeset/base/217848

Log:
  MFC 214675:
  Don't leak the LLE lock if the arptimer callout is pending or inactive.

Modified:
  stable/8/sys/netinet/if_ether.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netinet/if_ether.c
==============================================================================
--- stable/8/sys/netinet/if_ether.c	Tue Jan 25 20:56:18 2011	(r217847)
+++ stable/8/sys/netinet/if_ether.c	Tue Jan 25 20:59:47 2011	(r217848)
@@ -187,16 +187,16 @@ arptimer(void *arg)
 			pkts_dropped = llentry_free(lle);
 			ARPSTAT_ADD(dropped, pkts_dropped);
 			ARPSTAT_INC(timeouts);
-		} 
+		} else {
 #ifdef DIAGNOSTIC
-		else {
 			struct sockaddr *l3addr = L3_ADDR(lle);
 			log(LOG_INFO, 
 			    "arptimer issue: %p, IPv4 address: \"%s\"\n", lle,
 			    inet_ntoa(
 			        ((const struct sockaddr_in *)l3addr)->sin_addr));
-		}
 #endif
+			LLE_WUNLOCK(lle);
+		}
 	}
 	IF_AFDATA_UNLOCK(ifp);
 	CURVNET_RESTORE();


More information about the svn-src-all mailing list