in_mcast.c: need if_addr_lock around inm_release_deferred
Apply a similar fix as for in6_mcast.c. Reviewed by: hselasky Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20740
This commit is contained in:
parent
6751c1f63b
commit
6c18602692
@ -1268,7 +1268,9 @@ in_joingroup_locked(struct ifnet *ifp, const struct in_addr *gina,
|
|||||||
if (error) {
|
if (error) {
|
||||||
|
|
||||||
CTR2(KTR_IGMPV3, "%s: dropping ref on %p", __func__, inm);
|
CTR2(KTR_IGMPV3, "%s: dropping ref on %p", __func__, inm);
|
||||||
|
IF_ADDR_WLOCK(ifp);
|
||||||
inm_release_deferred(inm);
|
inm_release_deferred(inm);
|
||||||
|
IF_ADDR_WUNLOCK(ifp);
|
||||||
} else {
|
} else {
|
||||||
*pinm = inm;
|
*pinm = inm;
|
||||||
}
|
}
|
||||||
@ -2247,7 +2249,9 @@ inp_join_group(struct inpcb *inp, struct sockopt *sopt)
|
|||||||
if (is_new && imf) {
|
if (is_new && imf) {
|
||||||
if (imf->imf_inm != NULL) {
|
if (imf->imf_inm != NULL) {
|
||||||
IN_MULTI_LIST_LOCK();
|
IN_MULTI_LIST_LOCK();
|
||||||
|
IF_ADDR_WLOCK(ifp);
|
||||||
inm_release_deferred(imf->imf_inm);
|
inm_release_deferred(imf->imf_inm);
|
||||||
|
IF_ADDR_WUNLOCK(ifp);
|
||||||
IN_MULTI_LIST_UNLOCK();
|
IN_MULTI_LIST_UNLOCK();
|
||||||
}
|
}
|
||||||
ip_mfilter_free(imf);
|
ip_mfilter_free(imf);
|
||||||
|
Loading…
Reference in New Issue
Block a user