Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3777e0f authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Johannes Berg
Browse files

iwlwifi: mvm: fix locking in iwl_mvm_ipv6_addr_change



inet6_dev->lock can be taken from a timer. Disabled bottom
halves when we take it.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c3eb536a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -97,14 +97,14 @@ void iwl_mvm_ipv6_addr_change(struct ieee80211_hw *hw,
	struct inet6_ifaddr *ifa;
	int idx = 0;

	read_lock(&idev->lock);
	read_lock_bh(&idev->lock);
	list_for_each_entry(ifa, &idev->addr_list, if_list) {
		mvmvif->target_ipv6_addrs[idx] = ifa->addr;
		idx++;
		if (idx >= IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS)
			break;
	}
	read_unlock(&idev->lock);
	read_unlock_bh(&idev->lock);

	mvmvif->num_target_ipv6_addrs = idx;
}