Skip to content

Commit

Permalink
iwlwifi: mvm: BT Coex fix another NULL pointer dereference
Browse files Browse the repository at this point in the history
This patch is very similar to a previous fix: 22cba0c

When we disassociate, mac80211 removes the station and
then, it sets the bss it unsets the assoc bool in bss_info.

Since the firwmware wants it the opposite (first set the
MAC context as unassoc, and only then, remove the STA of
the API), we have a small period of time in which the STA
in firmware doesn't have a valid ieee80211_sta pointer.
During that time, iwl_mvm_vif->ap_sta_id, is still set
to the STA in firmware that represent the AP.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
  • Loading branch information
Emmanuel Grumbach committed Nov 25, 2013
1 parent a338f1e commit 56c07a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/iwlwifi/mvm/bt-coex.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,11 @@ static void iwl_mvm_bt_rssi_iterator(void *_data, u8 *mac,

sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id],
lockdep_is_held(&mvm->mutex));

/* This can happen if the station has been removed right now */
if (IS_ERR_OR_NULL(sta))
return;

mvmsta = (void *)sta->drv_priv;

data->num_bss_ifaces++;
Expand Down

0 comments on commit 56c07a9

Please sign in to comment.