Subject: Re: STMMAC: sleep inside atomic

From: Peppe CAVALLARO <[email-masked]>
Date: Mon, 6 Sep 2010 11:47:20 +0200

Hi Jiri,
On 9/4/2010 1:47 PM, Jiri Slaby wrote:
>
> Hi,
>
> 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.

Many thanks to have found it.

Regards,
Peppe
> regards,
> --
> js