linux-stable-rt/arch/x86/pci
Thomas Gleixner bb8d41330c 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 <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-02-25 08:30:58 -08:00
..
Makefile
acpi.c x86/PCI: use host bridge _CRS info by default on 2008 and newer machines 2010-02-23 09:43:42 -08:00
amd_bus.c
bus_numa.c PCI: augment bus resource table with a list 2010-02-23 09:43:37 -08:00
bus_numa.h PCI: augment bus resource table with a list 2010-02-23 09:43:37 -08:00
common.c x86/PCI: use host bridge _CRS info by default on 2008 and newer machines 2010-02-23 09:43:42 -08:00
direct.c
early.c
fixup.c
i386.c
init.c
irq.c
legacy.c
mmconfig-shared.c x86/PCI: Prevent mmconfig memory corruption 2010-02-25 08:30:58 -08:00
mmconfig_32.c
mmconfig_64.c
numaq_32.c
olpc.c
pcbios.c
visws.c