Skip to content

Commit

Permalink
iwlwifi: mvm: fix locking in iwl_mvm_ipv6_addr_change
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Emmanuel Grumbach authored and Johannes Berg committed Feb 11, 2013
1 parent c3eb536 commit a3777e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/iwlwifi/mvm/d3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a3777e0

Please sign in to comment.