]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
irqchip: gic: Fix unsafe locking reported by lockdep
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 6 Mar 2015 16:37:44 +0000 (16:37 +0000)
committerJason Cooper <jason@lakedaemon.net>
Sun, 8 Mar 2015 05:33:06 +0000 (05:33 +0000)
commitcf613871946230c5dd8178d07bcdc2984f4545cd
treea74f34ffbd961798a4e0432335f57b933b7401e2
parent3e39e8f56c1c67cdd1e8f06da0d6b7c831818c76
irqchip: gic: Fix unsafe locking reported by lockdep

When compiled with CONFIG_LOCKDEP, the kernel shouts badly, saying
that the locking in the GIC code is unsafe. I'm afraid the kernel
is right:

       CPU0
       ----
  lock(irq_controller_lock);
  <Interrupt>
    lock(irq_controller_lock);

 *** DEADLOCK ***

This can happen while enabling, disabling, setting the type
or the affinity of an interrupt.

The fix is to take the interrupt_controller_lock with interrupts
disabled in these cases.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1425659870-11832-6-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
drivers/irqchip/irq-gic.c