]> xenbits.xensource.com Git - xen.git/commit
x86/ioapic: avoid trying to access the -1th ioapic
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 Sep 2013 14:40:34 +0000 (16:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Sep 2013 14:40:34 +0000 (16:40 +0200)
commitef0ea8c2bbb3718df1dee8f15ff3206bf592b253
tree91a4f346622062b8e3b4aeae752ded99345cc5ad
parent48d50de8e086e6669979889fb58dbf1092d10347
x86/ioapic: avoid trying to access the -1th ioapic

Discovered by Coverity, CID 1055743

Depending on the contents of the mp_irqs/mp_ioapics from the MP table,
find_isa_irq_apic() might return -1, at which point calling
ioapic_read_entry() with it is bad.

In addition to bailing if pin is -1, bail if apic is -1.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/io_apic.c