Skip to content

Commit bcbec9e

Browse files
Arend van Spriellinvjw
authored andcommitted
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 <[email protected]> Reviewed-by: Kan Yan <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 1bb1f38 commit bcbec9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3297,7 +3297,9 @@ static struct brcmf_cfg80211_event_q *brcmf_deq_event(
32973297
}
32983298

32993299
/*
3300-
** push event to tail of the queue
3300+
* push event to tail of the queue
3301+
*
3302+
* remark: this function may not sleep as it is called in atomic context.
33013303
*/
33023304

33033305
static s32
@@ -3307,7 +3309,7 @@ brcmf_enq_event(struct brcmf_cfg80211_priv *cfg_priv, u32 event,
33073309
struct brcmf_cfg80211_event_q *e;
33083310
s32 err = 0;
33093311

3310-
e = kzalloc(sizeof(struct brcmf_cfg80211_event_q), GFP_KERNEL);
3312+
e = kzalloc(sizeof(struct brcmf_cfg80211_event_q), GFP_ATOMIC);
33113313
if (!e)
33123314
return -ENOMEM;
33133315

0 commit comments

Comments
 (0)