提交 cf44066a 编写于 作者: A Arend van Spriel 提交者: John W. Linville

brcm80211: fmac: use spinlock calls saving irq flags in brcmf_enq_event()

This function is executed within irq context. The call spin_unlock_irq
does enable interrupts which is not desired in the irq context. This patch
replaces them using the spin_loc_irqsave and spin_unlock_irqrestore
functions.
Reviewed-by: NPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: NKan Yan <kanyan@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 bcbec9e7
......@@ -3308,6 +3308,7 @@ brcmf_enq_event(struct brcmf_cfg80211_priv *cfg_priv, u32 event,
{
struct brcmf_cfg80211_event_q *e;
s32 err = 0;
ulong flags;
e = kzalloc(sizeof(struct brcmf_cfg80211_event_q), GFP_ATOMIC);
if (!e)
......@@ -3316,9 +3317,9 @@ brcmf_enq_event(struct brcmf_cfg80211_priv *cfg_priv, u32 event,
e->etype = event;
memcpy(&e->emsg, msg, sizeof(struct brcmf_event_msg));
spin_lock_irq(&cfg_priv->evt_q_lock);
spin_lock_irqsave(&cfg_priv->evt_q_lock, flags);
list_add_tail(&e->evt_q_list, &cfg_priv->evt_q_list);
spin_unlock_irq(&cfg_priv->evt_q_lock);
spin_unlock_irqrestore(&cfg_priv->evt_q_lock, flags);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册