Skip to content

Commit

Permalink
mwl8k: disable softirqs when accessing sta_notify_list
Browse files Browse the repository at this point in the history
Use spin_[un]lock_bh in mwl8k_sta_notify().  The sta_notify handler is
required to be atomic, yet it can be called in process context, so make
sure one call won't preempt another.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Pavel Roskin authored and John W. Linville committed Feb 16, 2010
1 parent 026331c commit 0466236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -3784,9 +3784,9 @@ mwl8k_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
s->cmd = cmd;
s->sta = *sta;

spin_lock(&priv->sta_notify_list_lock);
spin_lock_bh(&priv->sta_notify_list_lock);
list_add_tail(&s->list, &priv->sta_notify_list);
spin_unlock(&priv->sta_notify_list_lock);
spin_unlock_bh(&priv->sta_notify_list_lock);

ieee80211_queue_work(hw, &priv->sta_notify_worker);
}
Expand Down

0 comments on commit 0466236

Please sign in to comment.