Le Thu, 7 Feb 2008 15:56:45 +0530, "Rajat Jain" <Rajat.Jain@xxxxxxxxxxxx> a écrit : > This is regarding the following code in kernel/irq/handle.c. Consider > the case of a shared IRQ line, where two handlers are registered such > that first handler does not specify IRQF_DISABLED, but the second one > does. But it seems both the handlers will be called IRQs ENABLED > (which is certainly not what the second handler expects). > > I also checked but could not find anything that stops me from > registering two shared ISRs - one with IRQF_DISABLED & another > without this flag. Am I missing something here? I'd say you are right. I've checked whether during registration of the interrupt handler something is done to prevent this, but it seems not. register_irq() calls setup_irq(), which checks that if you request for a shared handler, then the already existing handler for the same IRQ must also accept to be shared. It also checks that the trigger flags are the same for all handlers sharing the same IRQ line, but doesn't check the IRQF_DISABLED flag. Maybe you could raise attention on this issue on the LKML by sending a patch to fix it ? Sincerly, Thomas -- Thomas Petazzoni, Free Electrons Free Embedded Linux Training Materials on http://free-electrons.com/training (More than 1500 pages!)
Attachment:
signature.asc
Description: PGP signature