All of lore.kernel.org
 help / color / mirror / Atom feed
* GFP flags for cfg80211_rx_mgmt
@ 2014-07-13 15:02 Vladimir Kondratiev
  2014-07-21  9:37 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Kondratiev @ 2014-07-13 15:02 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GFP flags for cfg80211_rx_mgmt
  2014-07-13 15:02 GFP flags for cfg80211_rx_mgmt Vladimir Kondratiev
@ 2014-07-21  9:37 ` Johannes Berg
  2014-08-10  8:13   ` Vladimir Kondratiev
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2014-07-21  9:37 UTC (permalink / raw)
  To: Vladimir Kondratiev; +Cc: linux-wireless

On Sun, 2014-07-13 at 08:02 -0700, Vladimir Kondratiev wrote:
> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GFP flags for cfg80211_rx_mgmt
  2014-07-21  9:37 ` Johannes Berg
@ 2014-08-10  8:13   ` Vladimir Kondratiev
  0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Kondratiev @ 2014-08-10  8:13 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Monday, July 21, 2014 11:37:41 AM Johannes Berg wrote:
> On Sun, 2014-07-13 at 08:02 -0700, Vladimir Kondratiev wrote:
> > 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
> 
Yes, I will. Sorry for delay, was out (climbing some 7000m+ peak :-) )

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-10  8:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-13 15:02 GFP flags for cfg80211_rx_mgmt Vladimir Kondratiev
2014-07-21  9:37 ` Johannes Berg
2014-08-10  8:13   ` Vladimir Kondratiev

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.