From: Arend van Spriel Date: Thu, 9 Feb 2012 20:09:06 +0000 (+0100) Subject: brcm80211: fmac: change allocation flag in brcmf_enq_event() function X-Git-Tag: firefly_0821_release~3680^2~3338^2~108^2~334 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bcbec9e777cc66fbbeb386c42d8af680fc941da7;p=firefly-linux-kernel-4.4.55.git brcm80211: fmac: change allocation flag in brcmf_enq_event() function As the function is called from atomic context it should not do the kzalloc call with GFP_KERNEL. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Kan Yan Reviewed-by: Franky (Zhenhui) Lin Signed-off-by: Arend van Spriel Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index e95a883c77da..285fa19e881d 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c @@ -3297,7 +3297,9 @@ static struct brcmf_cfg80211_event_q *brcmf_deq_event( } /* -** push event to tail of the queue +* push event to tail of the queue +* +* remark: this function may not sleep as it is called in atomic context. */ static s32 @@ -3307,7 +3309,7 @@ brcmf_enq_event(struct brcmf_cfg80211_priv *cfg_priv, u32 event, struct brcmf_cfg80211_event_q *e; s32 err = 0; - e = kzalloc(sizeof(struct brcmf_cfg80211_event_q), GFP_KERNEL); + e = kzalloc(sizeof(struct brcmf_cfg80211_event_q), GFP_ATOMIC); if (!e) return -ENOMEM;