From: Arend van Spriel <arend@broadcom.com>
To: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
<linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] cfg80211: remove @gfp parameter from cfg80211_rx_mgmt()
Date: Tue, 12 Aug 2014 11:16:02 +0200 [thread overview]
Message-ID: <53E9DB52.7040008@broadcom.com> (raw)
In-Reply-To: <1510813.tvyqjS7Sdn@lx-wigig-72>
On 08/12/2014 11:07 AM, Vladimir Kondratiev wrote:
> On Tuesday, August 12, 2014 10:24:00 AM Arend van Spriel wrote:
>> the cfg80211_rx_mgmt() call could be done with GFP_KERNEL flag in
>> brcmfmac.
> No, you can't. In the cfg80211_rx_mgmt(), @gfp used for memory allocation under
> spinlock. So, it is done while in_atomic() is true. One can't use waiting GFP_KERNEL
> in this case. Quote from cfg80211_rx_mgmt() (see net/wireless/mlme.c):
>
> spin_lock_bh(&wdev->mgmt_registrations_lock);
> <skip>
> list_for_each_entry(reg, &wdev->mgmt_registrations, list) {
> /* Indicate the received Action frame to user space */
> if (nl80211_send_mgmt(rdev, wdev, reg->nlportid,
> freq, sig_mbm,
> buf, len, flags, gfp))
> continue;
>
> result = true;
> break;
> }
>
> spin_unlock_bh(&wdev->mgmt_registrations_lock);
>
Those spinlock calls did not show in your patch so I missed that. Thanks
for clarifying.
Regards,
Arend
prev parent reply other threads:[~2014-08-12 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 10:29 [PATCH] cfg80211: remove @gfp parameter from cfg80211_rx_mgmt() Vladimir Kondratiev
2014-08-11 14:57 ` Johannes Berg
2014-08-12 8:24 ` Arend van Spriel
2014-08-12 8:31 ` Johannes Berg
2014-08-12 9:07 ` Vladimir Kondratiev
2014-08-12 9:16 ` Arend van Spriel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53E9DB52.7040008@broadcom.com \
--to=arend@broadcom.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=qca_vkondrat@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).