All of lore.kernel.org
 help / color / mirror / Atom feed
* STMMAC: sleep inside atomic
@ 2010-09-04 11:47 Jiri Slaby
  2010-09-06  9:47 ` Peppe CAVALLARO
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2010-09-04 11:47 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: David S. Miller, ML netdev

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?

regards,
-- 
js

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: STMMAC: sleep inside atomic
  2010-09-04 11:47 STMMAC: sleep inside atomic Jiri Slaby
@ 2010-09-06  9:47 ` Peppe CAVALLARO
  2010-09-06 19:25   ` Jiri Slaby
  0 siblings, 1 reply; 6+ messages in thread
From: Peppe CAVALLARO @ 2010-09-06  9:47 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: David S. Miller, ML netdev

 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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: STMMAC: sleep inside atomic
  2010-09-06  9:47 ` Peppe CAVALLARO
@ 2010-09-06 19:25   ` Jiri Slaby
  2010-09-06 20:08     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2010-09-06 19:25 UTC (permalink / raw)
  To: Peppe CAVALLARO; +Cc: David S. Miller, ML netdev

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.

> Many thanks to have found it.

welcome,
-- 
js

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: STMMAC: sleep inside atomic
  2010-09-06 19:25   ` Jiri Slaby
@ 2010-09-06 20:08     ` David Miller
  2010-09-06 20:55       ` Jiri Slaby
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2010-09-06 20:08 UTC (permalink / raw)
  To: jirislaby; +Cc: peppe.cavallaro, netdev

From: Jiri Slaby <jirislaby@gmail.com>
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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: STMMAC: sleep inside atomic
  2010-09-06 20:08     ` David Miller
@ 2010-09-06 20:55       ` Jiri Slaby
  2010-09-07  0:50         ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2010-09-06 20:55 UTC (permalink / raw)
  To: David Miller; +Cc: peppe.cavallaro, netdev

On 09/06/2010 10:08 PM, David Miller wrote:
>> 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.

I can't find it, could you send me subject of the message?

-- 
js

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: STMMAC: sleep inside atomic
  2010-09-06 20:55       ` Jiri Slaby
@ 2010-09-07  0:50         ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-09-07  0:50 UTC (permalink / raw)
  To: jirislaby; +Cc: peppe.cavallaro, netdev

From: Jiri Slaby <jirislaby@gmail.com>
Date: Mon, 06 Sep 2010 22:55:39 +0200

> On 09/06/2010 10:08 PM, David Miller wrote:
>>> 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.
> 
> I can't find it, could you send me subject of the message?

"[PATCH] stmmac: fix sleep inside atomic"

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-07  0:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-04 11:47 STMMAC: sleep inside atomic Jiri Slaby
2010-09-06  9:47 ` Peppe CAVALLARO
2010-09-06 19:25   ` Jiri Slaby
2010-09-06 20:08     ` David Miller
2010-09-06 20:55       ` Jiri Slaby
2010-09-07  0:50         ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.