From: Pavel Roskin Date: Sun, 14 Feb 2010 03:13:06 +0000 (-0500) Subject: mwl8k: disable softirqs when accessing sta_notify_list X-Git-Tag: firefly_0821_release~9833^2~3055^2~49^2~52 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=04662360854aefcb6337d93701892ad97411fdd0;p=firefly-linux-kernel-4.4.55.git mwl8k: disable softirqs when accessing sta_notify_list 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 0cfdb9db66f7..6497c841fb21 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -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); }