]> xenbits.xensource.com Git - xen.git/commit
x86/ioapic: Fix fixmap error path logic in ioapic_init_mappings()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 5 Aug 2020 11:05:27 +0000 (12:05 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 5 Aug 2020 16:35:11 +0000 (17:35 +0100)
commitb4175c6693e089ffcd77cd1ea388e76e67d36d57
treebf165e0a56a4bef2f222ed581214d37c34b51100
parente58a71274c65e7547fc2e917f051c5c04e2820e2
x86/ioapic: Fix fixmap error path logic in ioapic_init_mappings()

In the case that bad_ioapic_register() fails, the current position of idx++
means that clear_fixmap(idx) will be called with the wrong index, and not
clean up the mapping just created.

Increment idx as part of the loop, rather than midway through the loop body.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/io_apic.c