public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: in_atomic doesn't count local_irq_disable?
@ 2003-12-29 15:13 Manfred Spraul
  2003-12-30 13:26 ` Srivatsa Vaddagiri
  0 siblings, 1 reply; 15+ messages in thread
From: Manfred Spraul @ 2003-12-29 15:13 UTC (permalink / raw)
  To: Srivatsa Vaddagiri; +Cc: linux-kernel

Srivatsa Vaddagiri wrote:

>This is basically because down_read was called with interrupts disabled ..
>__might_sleep was "unable" to dump the stack of callers which 
>lead to this problem ..

What do you mean with unable? Could you post what was printed?

I guess it's a get_user within either spin_lock_irq() or local_irq_disable. Without more info about the context, it's difficult to figure out if the page fault handler or the caller should be updated
--
	Manfred




^ permalink raw reply	[flat|nested] 15+ messages in thread
* in_atomic doesn't count local_irq_disable?
@ 2003-12-29 13:33 Srivatsa Vaddagiri
  2003-12-29 13:35 ` Srivatsa Vaddagiri
  2003-12-30  2:37 ` Rusty Russell
  0 siblings, 2 replies; 15+ messages in thread
From: Srivatsa Vaddagiri @ 2003-12-29 13:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: lhcs-devel

Hi,
	I am getting messages like:

 "Debug: sleeping function called from invalid context at include/linux/rwsem.h:45"
 "in_atomic: 0, irqs_disabled(): 1"

while running some (CPU Hotplug) tests against (2.6.0-test11-bk6 + the CPU hotplug patch).

This is basically because down_read was called with interrupts disabled ..
__might_sleep was "unable" to dump the stack of callers which 
lead to this problem ..

I put some debug code in down_read (an inline function) and found
that down_read was actually called from do_page_fault.

do_page_fault avoids calling this down_read if we are "in_atomic()"
Isn't in_atomic supposed to count IRQs disabled case? If not
then shouldn't do_page_fault also check for irqs_disabled() 
before calling down_read()?

Please let me know what I am missing here!


-- 


Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560033

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

end of thread, other threads:[~2004-03-29 15:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-29 15:13 in_atomic doesn't count local_irq_disable? Manfred Spraul
2003-12-30 13:26 ` Srivatsa Vaddagiri
2003-12-31 13:29   ` BUG in x86 do_page_fault? [was Re: in_atomic doesn't count local_irq_disable?] Srivatsa Vaddagiri
2003-12-31 19:08     ` Linus Torvalds
2004-01-04 14:57       ` Pavel Machek
2004-01-04 20:43         ` Linus Torvalds
2004-03-29 15:43         ` Linus Torvalds
2004-03-29 15:42       ` Pavel Machek
2003-12-31 13:35   ` [lhcs-devel] Re: in_atomic doesn't count local_irq_disable? Srivatsa Vaddagiri
2004-01-02  0:52     ` Manfred Spraul
2004-01-02 10:56       ` Srivatsa Vaddagiri
2004-01-02 14:00     ` Srivatsa Vaddagiri
  -- strict thread matches above, loose matches on Subject: below --
2003-12-29 13:33 Srivatsa Vaddagiri
2003-12-29 13:35 ` Srivatsa Vaddagiri
2003-12-30  2:37 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox