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: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Emmanuel Grumbach 2013-02-10 13:07:08 +02:00 committed by Johannes Berg
parent c3eb536aab
commit a3777e0fdd

View File

@ -97,14 +97,14 @@ void iwl_mvm_ipv6_addr_change(struct ieee80211_hw *hw,
struct inet6_ifaddr *ifa; struct inet6_ifaddr *ifa;
int idx = 0; int idx = 0;
read_lock(&idev->lock); read_lock_bh(&idev->lock);
list_for_each_entry(ifa, &idev->addr_list, if_list) { list_for_each_entry(ifa, &idev->addr_list, if_list) {
mvmvif->target_ipv6_addrs[idx] = ifa->addr; mvmvif->target_ipv6_addrs[idx] = ifa->addr;
idx++; idx++;
if (idx >= IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS) if (idx >= IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS)
break; break;
} }
read_unlock(&idev->lock); read_unlock_bh(&idev->lock);
mvmvif->num_target_ipv6_addrs = idx; mvmvif->num_target_ipv6_addrs = idx;
} }