cfg80211: remove @gfp parameter from cfg80211_rx_mgmt()
In the cfg80211_rx_mgmt(), parameter @gfp was used for the memory allocation. But, memory get allocated under spin_lock_bh(), this implies atomic context. So, one can't use GFP_KERNEL, only variants with no __GFP_WAIT. Actually, in all occurrences GFP_ATOMIC is used (wil6210 use GFP_KERNEL by mistake), and it should be this way or warning triggered in the memory allocation code. Remove @gfp parameter as no actual choice exist, and use hard coded GFP_ATOMIC for memory allocation. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
649b2a4da5
commit
970fdfa89b
@@ -2725,7 +2725,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
|
||||
sig = status->signal;
|
||||
|
||||
if (cfg80211_rx_mgmt(&rx->sdata->wdev, status->freq, sig,
|
||||
rx->skb->data, rx->skb->len, 0, GFP_ATOMIC)) {
|
||||
rx->skb->data, rx->skb->len, 0)) {
|
||||
if (rx->sta)
|
||||
rx->sta->rx_packets++;
|
||||
dev_kfree_skb(rx->skb);
|
||||
|
Reference in New Issue
Block a user