diff options
Diffstat (limited to 'net/ipv6/mcast.c')
| -rw-r--r-- | net/ipv6/mcast.c | 15 | 
1 files changed, 7 insertions, 8 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index bc6e0a0bad3c..7ba01d8cfbae 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -159,9 +159,9 @@ static int unsolicited_report_interval(struct inet6_dev *idev)  	int iv;  	if (mld_in_v1_mode(idev)) -		iv = idev->cnf.mldv1_unsolicited_report_interval; +		iv = READ_ONCE(idev->cnf.mldv1_unsolicited_report_interval);  	else -		iv = idev->cnf.mldv2_unsolicited_report_interval; +		iv = READ_ONCE(idev->cnf.mldv2_unsolicited_report_interval);  	return iv > 0 ? iv : 1;  } @@ -1202,15 +1202,15 @@ static bool mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,  static int mld_force_mld_version(const struct inet6_dev *idev)  { +	const struct net *net = dev_net(idev->dev); +	int all_force; + +	all_force = READ_ONCE(net->ipv6.devconf_all->force_mld_version);  	/* Normally, both are 0 here. If enforcement to a particular is  	 * being used, individual device enforcement will have a lower  	 * precedence over 'all' device (.../conf/all/force_mld_version).  	 */ - -	if (dev_net(idev->dev)->ipv6.devconf_all->force_mld_version != 0) -		return dev_net(idev->dev)->ipv6.devconf_all->force_mld_version; -	else -		return idev->cnf.force_mld_version; +	return all_force ?: READ_ONCE(idev->cnf.force_mld_version);  }  static bool mld_in_v2_mode_only(const struct inet6_dev *idev) @@ -2719,7 +2719,6 @@ void ipv6_mc_down(struct inet6_dev *idev)  	/* Should stop work after group drop. or we will  	 * start work again in mld_ifc_event()  	 */ -	synchronize_net();  	mld_query_stop_work(idev);  	mld_report_stop_work(idev);  |