ACPI: ioapic: Clear on-stack resource before using it
authorJoerg Roedel <jroedel@suse.de>
Wed, 22 Mar 2017 17:33:23 +0000 (18:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2017 08:21:55 +0000 (10:21 +0200)
commit454cac5d0891494dd2050a4da4fa64a9173c38af
tree094e664229b31396494945234f3a5f29c112db32
parentc1628774f0c807944478684b97cf258da8f7c10a
ACPI: ioapic: Clear on-stack resource before using it

commit e3d5092b6756b9e0b08f94bbeafcc7afe19f0996 upstream.

The on-stack resource-window 'win' in setup_res() is not
properly initialized. This causes the pointers in the
embedded 'struct resource' to contain stale addresses.

These pointers (in my case the ->child pointer) later get
propagated to the global iomem_resources list, causing a #GP
exception when the list is traversed in
iomem_map_sanity_check().

Fixes: c183619b63ec (x86/irq, ACPI: Implement ACPI driver to support IOAPIC hotplug)
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/ioapic.c