From: Yan-Hsuan Chuang Date: Tue, 23 Oct 2018 03:24:44 +0000 (+0800) Subject: mac80211: fix GFP_KERNEL under tasklet context X-Git-Tag: rel_imx_4.19.35_1.1.0~7942 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=e08ab93325bb23aba2111fc4ad1e06f5adba7cb2;p=linux.git mac80211: fix GFP_KERNEL under tasklet context commit c752cac9db1b0c469db7ba9d17af4ba708984db5 upstream. cfg80211_sta_opmode_change_notify needs a gfp_t flag to hint the nl80211 stack when allocating new skb, but it is called under tasklet context here with GFP_KERNEL and kernel will yield a warning about it. Cc: stable@vger.kernel.org Fixes: ff84e7bfe176 ("mac80211: Add support to notify ht/vht opmode modification.") Signed-off-by: Yan-Hsuan Chuang ACKed-by: Larry Finger Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 96611d5dfadb..5ac7a0a49916 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3029,7 +3029,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) cfg80211_sta_opmode_change_notify(sdata->dev, rx->sta->addr, &sta_opmode, - GFP_KERNEL); + GFP_ATOMIC); goto handled; } case WLAN_HT_ACTION_NOTIFY_CHANWIDTH: { @@ -3066,7 +3066,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) cfg80211_sta_opmode_change_notify(sdata->dev, rx->sta->addr, &sta_opmode, - GFP_KERNEL); + GFP_ATOMIC); goto handled; } default: