2010-04-21 04:30:09     BUG: sleeping function called from invalid context at mm/slab.c:3044

Document created by Aaronwu Employee on Aug 21, 2013
Version 1Show Document
  • View in full screen mode

2010-04-21 04:30:09     BUG: sleeping function called from invalid context at mm/slab.c:3044

Martin Dorwig (GERMANY)

Message: 88713   

 

hello,

 

when doing ifconfig the system shows this message:

 

root:/> ifconfig -a eth0 192.168.69.50

BUG: sleeping function called from invalid context at mm/slab.c:3044

in_atomic(): 0, irqs_disabled(): 1, pid: 59, name: ifconfig

Return addresses in stack:

   address : <0x0000ba7a> { ___might_sleep + 0xba }

  frame  1 : <0x0000ba7e> { ___might_sleep + 0xbe }

   address : <0x0018cc28> { _rt_cache_flush + 0xc }

  frame  2 : <0x00043ece> { _kmem_cache_alloc + 0x8a }

  frame  3 : <0x00008922> { __sram_alloc + 0xbe }

   address : <0x00189bc6> { _nlmsg_notify + 0x2e }

   address : <0x000339ce> { ___ipipe_restore_root + 0x36 }

  frame  4 : <0x00008d8e> { _l1_data_B_sram_alloc + 0x56 }

 

this is caused by l1_data_B_sram_alloc which takes the l1_data_sram_lock and calls _sram_alloc with irqs disabled.

 

_sram_alloc calls kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);

 

GPF_KERNEL has the __GFP_WAIT flag set, which triggers the bug when the kernel is compiled with DEBUG_SPINLOCK_SLEEP

 

im using uClinux 2009R1.1-RC4

with Linux-2.6.28.10-ADI-2009R1.1

on a BF537 board.

 

what can be done to get rid of the ugly message ?

 

Martin

TranslateQuoteReplyEditDelete

 

 

2010-04-21 04:40:52     Re: BUG: sleeping function called from invalid context at mm/slab.c:3044

Mike Frysinger (UNITED STATES)

Message: 88715   

 

disable that config option or change the L1 SRAM code to use GFP_ATOMIC

QuoteReplyEditDelete

 

 

2010-04-21 05:06:44     Re: BUG: sleeping function called from invalid context at mm/slab.c:3044

Martin Dorwig (GERMANY)

Message: 88718   

 

thank you for your fast reply.

 

is there a reason to not general change the flag to GPF_ATOMIC ?

 

Martin

TranslateQuoteReplyEditDelete

 

 

2010-04-21 05:22:48     Re: BUG: sleeping function called from invalid context at mm/slab.c:3044

Mike Frysinger (UNITED STATES)

Message: 88719   

 

in the two alloc funcs, probably not

QuoteReplyEditDelete

 

 

2010-05-11 00:44:29     Re: BUG: sleeping function called from invalidcontext at mm/slab.c:3044

Mike Frysinger (UNITED STATES)

Message: 89299    ive converted just the one (_sram_alloc) as the other

(sram_alloc_with_lsl) only works with userspace functions and so

doesnt need to be atomic

Attachments

    Outcomes