aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/in_mcast.c
diff options
context:
space:
mode:
authorRyan Libby <rlibby@FreeBSD.org>2019-11-25 22:25:34 +0000
committerRyan Libby <rlibby@FreeBSD.org>2019-11-25 22:25:34 +0000
commit200f3ac6f76e1bc0d601e9269db8de4ccc1d1de9 (patch)
treecfd7def87ca9fd1fcfd9f9d29145af36b9d4c9cf /sys/netinet/in_mcast.c
parent6afe56f9c3acf521f9896cd2a546ce870d9e3a6c (diff)
downloadsrc-200f3ac6f76e1bc0d601e9269db8de4ccc1d1de9.tar.gz
src-200f3ac6f76e1bc0d601e9269db8de4ccc1d1de9.zip
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
Notes
Notes: svn path=/head/; revision=355103
Diffstat (limited to 'sys/netinet/in_mcast.c')
-rw-r--r--sys/netinet/in_mcast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index 9def61fca96a..bfc5e3b3869a 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -1268,7 +1268,9 @@ in_joingroup_locked(struct ifnet *ifp, const struct in_addr *gina,
if (error) {
CTR2(KTR_IGMPV3, "%s: dropping ref on %p", __func__, inm);
+ IF_ADDR_WLOCK(ifp);
inm_release_deferred(inm);
+ IF_ADDR_WUNLOCK(ifp);
} else {
*pinm = inm;
}
@@ -2247,7 +2249,9 @@ out_inp_unlocked:
if (is_new && imf) {
if (imf->imf_inm != NULL) {
IN_MULTI_LIST_LOCK();
+ IF_ADDR_WLOCK(ifp);
inm_release_deferred(imf->imf_inm);
+ IF_ADDR_WUNLOCK(ifp);
IN_MULTI_LIST_UNLOCK();
}
ip_mfilter_free(imf);