x86: check for unmask() during deregister_irq() IRQ handlers for type "IPI" do not have mask or unmask methods. Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
diff --git a/kern/arch/x86/trap.c b/kern/arch/x86/trap.c index b630aba..a365d70 100644 --- a/kern/arch/x86/trap.c +++ b/kern/arch/x86/trap.c
@@ -843,7 +843,8 @@ /* Ideally, the driver should have told the device to not fire the IRQ * anymore. If they do, we may get a warn_once. This could be on * another core, etc. */ - irq_h->mask(irq_h, irq_h->apic_vector); + if (irq_h->mask) + irq_h->mask(irq_h, irq_h->apic_vector); synchronize_rcu(); if (irq_h->cleanup) irq_h->cleanup(irq_h);