Search Linux Wireless

Re: [RFC v2 06/12] rtw88: fw and efuse files

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

 



Stanislaw Gruszka <sgruszka@xxxxxxxxxx> writes:

> On Wed, Oct 03, 2018 at 04:02:22PM +0800, yhchuang@xxxxxxxxxxx wrote:
>
>> +void rtw_add_rsvd_page(struct rtw_dev *rtwdev, enum rtw_rsvd_packet_type type,
>> +		       bool txdesc)
>> +{
>> +	struct rtw_rsvd_page *rsvd_pkt;
>> +
>> +	list_for_each_entry(rsvd_pkt, &rtwdev->rsvd_page_list, list) {
>> +		if (rsvd_pkt->type == type)
>> +			return;
>> +	}
>> +
>> +	rsvd_pkt = kmalloc(sizeof(*rsvd_pkt),
>> +			   in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
>
> It's never called from interrupt. You have to check kmalloc output value.

My recommendation is to always avoid in_interrupt().

-- 
Kalle Valo



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

  Powered by Linux