summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorRui Wang <rui.y.wang@intel.com>2016-06-08 14:59:52 +0800
committerIngo Molnar <mingo@kernel.org>2016-06-10 14:45:54 +0200
commit9d98bcec731756b8688b59ec998707924d716d7b (patch)
treef532e712dd97ca994dde1ee5563188b6d0c454bb /arch/x86/boot
parentaaee8c3c5cce2d9107310dd9f3026b4f901d441c (diff)
downloadop-kernel-dev-9d98bcec731756b8688b59ec998707924d716d7b.zip
op-kernel-dev-9d98bcec731756b8688b59ec998707924d716d7b.tar.gz
x86/ioapic: Fix incorrect pointers in ioapic_setup_resources()
On a 4-socket Brickland system, hot-removing one ioapic is fine. Hot-removing the 2nd one causes panic in mp_unregister_ioapic() while calling release_resource(). It is because the iomem_res pointer has already been released when removing the first ioapic. To explain the use of &res[num] here: res is assigned to ioapic_resources, and later in ioapic_insert_resources() we do: struct resource *r = ioapic_resources; for_each_ioapic(i) { insert_resource(&iomem_resource, r); r++; } Here 'r' is treated as an arry of 'struct resource', and the r++ ensures that each element of the array is inserted separately. Thus we should call release_resouce() on each element at &res[num]. Fix it by assigning the correct pointers to ioapics[i].iomem_res in ioapic_setup_resources(). Signed-off-by: Rui Wang <rui.y.wang@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: tony.luck@intel.com Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: bhelgaas@google.com Link: http://lkml.kernel.org/r/1465369193-4816-3-git-send-email-rui.y.wang@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/boot')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud