Skip to contentSkip to conversation

GFP flags for cfg80211_rx_mgmt

DISCUSSION Vladimir Kondratiev 2 participants 3 messages Jul 13, 2014 – Aug 10, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

In the cfg80211_rx_mgmt(), there is parameter 'gfp_t gfp' that is passed to the nl80211_send_mgmt() and then to alloc_skb(). In fact, nl80211_send_mgmt() called under spinlock, so one can't use GFP_KERNEL. However, documentation for cfg80211_rx_mgmt does not restrict GFP flags.

I suggest to document this, and enforce in some way (WARN_ONCE?), or just remove this parameter - everywhere in the kernel GFP_ATOMIC is used.

Thanks, Vladimir

#1 lore raw
Quoted 11 lines · Vladimir Kondratiev

Hi,

In the cfg80211_rx_mgmt(), there is parameter 'gfp_t gfp' that is passed to the nl80211_send_mgmt() and then to alloc_skb(). In fact, nl80211_send_mgmt() called under spinlock, so one can't use GFP_KERNEL. However, documentation for cfg80211_rx_mgmt does not restrict GFP flags.

I suggest to document this, and enforce in some way (WARN_ONCE?), or just remove this parameter - everywhere in the kernel GFP_ATOMIC is used.

I say just remove it, want to send a patch?

johannes

#2 lore raw
Quoted 9 lines · Johannes Berg
Quoted 8 lines · Vladimir Kondratiev

Hi,

In the cfg80211_rx_mgmt(), there is parameter 'gfp_t gfp' that is passed to the nl80211_send_mgmt() and then to alloc_skb(). In fact, nl80211_send_mgmt() called under spinlock, so one can't use GFP_KERNEL. However, documentation for cfg80211_rx_mgmt does not restrict GFP flags.

Quoted 8 lines
Quoted 3 lines

I suggest to document this, and enforce in some way (WARN_ONCE?), or just remove this parameter - everywhere in the kernel GFP_ATOMIC is used.

I say just remove it, want to send a patch?

johannes

Yes, I will. Sorry for delay, was out (climbing some 7000m+ peak :-) )