svn commit: r239353 - head/sys/netinet
Randall Stewart
rrs at FreeBSD.org
Fri Aug 17 05:51:47 UTC 2012
Author: rrs
Date: Fri Aug 17 05:51:46 2012
New Revision: 239353
URL: http://svn.freebsd.org/changeset/base/239353
Log:
Ok jhb, lets move the ifa_free() down to the bottom to
assure that *all* tables and such are removed before
we start to free. This won't protect the Hash in ip_input.c
but in theory should protect any other uses that *do* use locks.
MFC after: 1 week (or more)
Modified:
head/sys/netinet/in.c
Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c Fri Aug 17 05:02:29 2012 (r239352)
+++ head/sys/netinet/in.c Fri Aug 17 05:51:46 2012 (r239353)
@@ -573,7 +573,6 @@ in_control(struct socket *so, u_long cmd
}
TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link);
IF_ADDR_WUNLOCK(ifp);
-/* ifa_free(&ia->ia_ifa); - Double free?? */ /* if_addrhead */
IN_IFADDR_WLOCK();
TAILQ_REMOVE(&V_in_ifaddrhead, ia, ia_link);
@@ -597,6 +596,7 @@ in_control(struct socket *so, u_long cmd
} else
ifa_free(&iap->ia_ifa);
+ ifa_free(&ia->ia_ifa); /* if_addrhead */
ifa_free(&ia->ia_ifa); /* in_ifaddrhead */
out:
if (ia != NULL)
More information about the svn-src-head
mailing list