Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2012 15:57:06 +0000
From:      "Andrew Smedley (andrsmed)" <andrsmed@cisco.com>
To:        "freebsd-bugs@freebsd.org" <freebsd-bugs@freebsd.org>
Subject:   lltable leak when adding and removing IPv6 addresses
Message-ID:  <6EC4152AB9CF134090F680D4628FE4AE1BC92593@xmb-aln-x06.cisco.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
I've found what appears to be a lltable leak when adding and removing IPv6
addresses.

# vmstat ­m | grep lltable
      lltable    14     4k       -       14  128,256
# ifconfig em0 inet6 3ffe:b00:1:1::1 alias
# vmstat ­m | grep lltable
      lltable    15     4k       -       15  128,256
# ifconfig em0 inet6 3ffe:b00:1:1::1 -alias
# vmstat ­m | grep lltable
      lltable    15     4k       -       15  128,256

The attached patch seems to fix the problem.

Regards,

Andrew 




[-- Attachment #2 --]
Index: in6.c
===================================================================
--- in6.c	(revision 241395)
+++ in6.c	(working copy)
@@ -2610,7 +2610,8 @@
 		if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) {
 			LLE_WLOCK(lle);
 			lle->la_flags |= LLE_DELETED;
-			LLE_WUNLOCK(lle);
+			LIST_REMOVE(lle, lle_next);
+			in6_lltable_free(llt, lle); /* Unlocks lle */
 #ifdef DIAGNOSTIC
 			log(LOG_INFO, "ifaddr cache = %p  is deleted\n", lle);
 #endif

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6EC4152AB9CF134090F680D4628FE4AE1BC92593>