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)
This commit is contained in:
parent
f274a47134
commit
9424879158
@ -573,7 +573,6 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
|
|||||||
}
|
}
|
||||||
TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link);
|
TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link);
|
||||||
IF_ADDR_WUNLOCK(ifp);
|
IF_ADDR_WUNLOCK(ifp);
|
||||||
/* ifa_free(&ia->ia_ifa); - Double free?? */ /* if_addrhead */
|
|
||||||
|
|
||||||
IN_IFADDR_WLOCK();
|
IN_IFADDR_WLOCK();
|
||||||
TAILQ_REMOVE(&V_in_ifaddrhead, ia, ia_link);
|
TAILQ_REMOVE(&V_in_ifaddrhead, ia, ia_link);
|
||||||
@ -597,6 +596,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
|
|||||||
} else
|
} else
|
||||||
ifa_free(&iap->ia_ifa);
|
ifa_free(&iap->ia_ifa);
|
||||||
|
|
||||||
|
ifa_free(&ia->ia_ifa); /* if_addrhead */
|
||||||
ifa_free(&ia->ia_ifa); /* in_ifaddrhead */
|
ifa_free(&ia->ia_ifa); /* in_ifaddrhead */
|
||||||
out:
|
out:
|
||||||
if (ia != NULL)
|
if (ia != NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user