aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/system.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2010-02-25 16:42:11 +0100
committerJesse Barnes <[email protected]>2010-02-25 08:30:58 -0800
commitbb8d41330ce27edb91adb6922d3f8e1a8923f727 (patch)
treeb3d7f6132edae2e7e00e734922c814a880f79fa8 /drivers/acpi/system.c
parentcbbc0de700e61d0cdc854d435dbc2ef148de0e00 (diff)
x86/PCI: Prevent mmconfig memory corruption
commit ff097ddd4 (x86/PCI: MMCONFIG: manage pci_mmcfg_region as a list, not a table) introduced a nasty memory corruption when pci_mmcfg_list is empty. pci_mmcfg_check_end_bus_number() dereferences pci_mmcfg_list.prev even when the list is empty. The following write hits some variable near to pci_mmcfg_list. Further down a similar problem exists, where cfg->list.next is dereferenced unconditionally and a comparison with some variable near to pci_mmcfg_list happens. Add a check for the last element into the for_each_entry() loop and remove all the other crappy logic which is just a leftover of the old array based code which was replaced by the list conversion. Reported-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: [email protected] Signed-off-by: Jesse Barnes <[email protected]>
Diffstat (limited to 'drivers/acpi/system.c')
0 files changed, 0 insertions, 0 deletions