Search Linux Wireless

Re: [PATCH] cfg80211: remove @gfp parameter from cfg80211_rx_mgmt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux