GFP flags for cfg80211_rx_mgmt
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
Quoted 11 lines · Vladimir Kondratiev
Hi,
In the
cfg80211_rx_mgmt(), there is parameter 'gfp_tgfp' that is passed to thenl80211_send_mgmt()and then toalloc_skb(). In fact,nl80211_send_mgmt()called under spinlock, so one can't useGFP_KERNEL. However, documentation forcfg80211_rx_mgmtdoes not restrict GFP flags.I suggest to document this, and enforce in some way (
WARN_ONCE?), or just remove this parameter - everywhere in the kernelGFP_ATOMICis used.
I say just remove it, want to send a patch?
johannes
Quoted 9 lines · Johannes Berg
Quoted 8 lines · Vladimir Kondratiev
Hi,
In the
cfg80211_rx_mgmt(), there is parameter 'gfp_tgfp' that is passed to thenl80211_send_mgmt()and then toalloc_skb(). In fact,nl80211_send_mgmt()called under spinlock, so one can't useGFP_KERNEL. However, documentation forcfg80211_rx_mgmtdoes 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 kernelGFP_ATOMICis used.I say just remove it, want to send a patch?
johannes
Yes, I will. Sorry for delay, was out (climbing some 7000m+ peak :-) )