* [PATCH] mac80211: fix GFP_KERNEL under tasklet context
@ 2018-10-23 3:24 yhchuang
2018-10-23 13:56 ` Larry Finger
0 siblings, 1 reply; 2+ messages in thread
From: yhchuang @ 2018-10-23 3:24 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless
From: Yan-Hsuan Chuang <yhchuang@realtek.com>
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.
Fixes: ff84e7bfe176 ("mac80211: Add support to notify ht/vht opmode modification.")
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
net/mac80211/rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 64742f2..03d3964f 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3028,7 +3028,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: {
@@ -3065,7 +3065,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:
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: fix GFP_KERNEL under tasklet context
2018-10-23 3:24 [PATCH] mac80211: fix GFP_KERNEL under tasklet context yhchuang
@ 2018-10-23 13:56 ` Larry Finger
0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2018-10-23 13:56 UTC (permalink / raw)
To: yhchuang, johannes; +Cc: linux-wireless
On 10/22/18 10:24 PM, yhchuang@realtek.com wrote:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>
> 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.
>
> Fixes: ff84e7bfe176 ("mac80211: Add support to notify ht/vht opmode modification.")
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
> ---
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Just in case a "Fixes" is not enough, please add
Cc: Stable <stable@vger.kernel.org> # v4.17+
Larry
> net/mac80211/rx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 64742f2..03d3964f 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -3028,7 +3028,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: {
> @@ -3065,7 +3065,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:
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-23 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 3:24 [PATCH] mac80211: fix GFP_KERNEL under tasklet context yhchuang
2018-10-23 13:56 ` Larry Finger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.