svn commit: r214675 - head/sys/netinet

John Baldwin jhb at FreeBSD.org
Tue Nov 2 13:00:57 UTC 2010


Author: jhb
Date: Tue Nov  2 13:00:56 2010
New Revision: 214675
URL: http://svn.freebsd.org/changeset/base/214675

Log:
  Don't leak the LLE lock if the arptimer callout is pending or inactive.
  
  Reported by:	David Rhodus
  MFC after:	1 month

Modified:
  head/sys/netinet/if_ether.c

Modified: head/sys/netinet/if_ether.c
==============================================================================
--- head/sys/netinet/if_ether.c	Tue Nov  2 12:42:46 2010	(r214674)
+++ head/sys/netinet/if_ether.c	Tue Nov  2 13:00:56 2010	(r214675)
@@ -178,16 +178,16 @@ arptimer(void *arg)
 			LLE_REMREF(lle);
 			(void) llentry_free(lle);
 			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-head mailing list