sleeping function called from invalid context
HI All,
I wrote one module and inserted in 2.6.9 version kernel. In my module there is a call for local_irq_save(flags). In kernel log messages i see this debug message for my call to local_irq_save(flags). Debug: sleeping function called from invalid context at mm/slab.c:2052 in_atomic():0, irqs_disabled():1 What this error is and how to resolve it? Thanks Neeraj |
hi,
are you using kmem_cache_alloc() routine inside your module ?? looks like you are allocating some memory in the interrupt context using GFP_WAIT flag enabled. do post some of the code of your module if you can. Regards Mehul. |
Sleeping function bug in fedora 11
Hello,
I am trying to read file from kernel module.i have used filp_open() function.But when i run this module my dmesg shows bug "sleeping function called from invalid context at mm/slab.c:1719 in_atomic():0, irqs_disabled():1. Because of this i am unable to open the file. I am unable to resolve this bug. Plz help me. |
Meta: Are you guys sure that you are ready for writing kernel-code? Methinks you should collect a few hundreds reputation points beforehand.
|
@nirvruti I suggest you go checkout http://kernelnewbies.org/. You could try visiting their forum, their IRC channel, or joining the mailing list. And if you're brave enough and informative enough you could try asking question from the main linux kernel mailing list, though I don't really recommend it. But just to inform you. You could also just join the list without posting if you're curious.
|
Quote:
|
Read http://lwn.net/Kernel/LDD3/ and only then come back with any questions.
Also, to answer your question, you are trying to open the file from a context where sleeping is not allowed. My guess is that you're doing so from an interrupt handler. |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 12:52 AM. |