Subject: Re: STMMAC: sleep inside atomic

From: David Miller <[email-masked]>
Date: Mon, 06 Sep 2010 13:08:55 -0700 (PDT)

From: Jiri Slaby <[email-masked]>
Date: Mon, 06 Sep 2010 21:25:07 +0200

> On 09/06/2010 11:47 AM, Peppe CAVALLARO wrote:
>> On 9/4/2010 1:47 PM, Jiri Slaby wrote:
>>> stanse found that the driver may sleep inside atomic:
>>> stmmac_resume
>>>   -> spin_lock
>>>   -> stmmac_open
>>>     -> request_irq
>>>     -> kzalloc(..., GFP_KERNEL);
>>>     -> init_dma_desc_rings
>>>       -> kmalloc(..., GFP_KERNEL);
>>>     -> and many others...
>>>   -> spin_unlock
>>>
>>> Could you fix that?
>>>
>> Yes I could ...  kmalloc(...,GFP_KERNEL) can sleep!
>> I will fix the spinlock usage in the driver's resume function and send a
>> patch to the mailing list asap.
> 
> Hi, I hope you'll carbon-copy me. It's not only kmalloc, request_irq
> and others may sleep too.

Guiseppe CAVALLARO posted a patch that seems to be a working one,
please see his netdev posting.