Stanislaw Gruszka <[email protected]> writes:

> On Wed, Oct 03, 2018 at 04:02:22PM +0800, [email protected] 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

Reply via email to