Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2019 22:25:34 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355103 - head/sys/netinet
Message-ID:  <201911252225.xAPMPYDV077555@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rlibby
Date: Mon Nov 25 22:25:34 2019
New Revision: 355103
URL: https://svnweb.freebsd.org/changeset/base/355103

Log:
  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

Modified:
  head/sys/netinet/in_mcast.c

Modified: head/sys/netinet/in_mcast.c
==============================================================================
--- head/sys/netinet/in_mcast.c	Mon Nov 25 22:25:10 2019	(r355102)
+++ head/sys/netinet/in_mcast.c	Mon Nov 25 22:25:34 2019	(r355103)
@@ -1268,7 +1268,9 @@ in_joingroup_locked(struct ifnet *ifp, const struct in
 	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);



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