Skip to contentSkip to conversation

STMMAC: sleep inside atomic

DISCUSSION Jiri Slaby 3 participants 6 messages Sep 4, 2010 – Sep 7, 2010

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

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,

Signature · 1 line
js
#1 lore raw

Hi Jiri,

Quoted 7 lines · Jiri Slaby

Hi,

stanse found that the driver may sleep inside atomic:
stmmac_resume
-> spin_lock
-> stmmac_open

Quoted 9 lines
    -> 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

Quoted 6 lines

regards,
--
js

author
#2 lore raw
Quoted 12 lines · Peppe CAVALLARO
Quoted 11 lines · Jiri Slaby

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

Quoted 5 lines
Quoted 2 lines

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.

Quoted 1 line

Many thanks to have found it.

welcome,

Signature · 1 line
js
maintainer
#3 lore raw

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

Quoted 13 lines · Peppe CAVALLARO
Quoted 12 lines · Jiri Slaby
Quoted 11 lines

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

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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.

author
#4 lore raw
Quoted 5 lines · David Miller
Quoted 2 lines

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?

Signature · 1 line
js
maintainer
#5 lore raw

From: Jiri Slaby <[email protected]>
Date: Mon, 06 Sep 2010 22:55:39 +0200

Quoted 8 lines · David Miller
Quoted 5 lines
Quoted 2 lines

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"