linux-uconsole/drivers/pci
Michel Dänzer c1b940de40 PCI: Fix infinite loop with ROM image of size 0
commit 16b036af31 upstream.

If the image size would ever read as 0, pci_get_rom_size() could keep
processing the same image over and over again.  Exit the loop if we ever
read a length of zero.

This fixes a soft lockup on boot when the radeon driver calls
pci_get_rom_size() on an AMD Radeon R7 250X PCIe discrete graphics card.

[bhelgaas: changelog, reference]
Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1386973
Reported-by: Federico <federicotg@gmail.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 14:40:48 -08:00
..
hotplug PCI: shpchp: Check bridge's secondary (not primary) bus speed 2014-06-07 13:25:38 -07:00
pcie PCI: Remove duplicate pci_disable_device() from pcie_portdrv_remove() 2013-12-04 10:57:04 -08:00
access.c PCI: Support PCIe Capability Slot registers only for ports with slots 2013-11-29 11:11:42 -08:00
ats.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
bus.c PCI: Delay final fixups until resources are assigned 2013-05-07 14:35:44 -06:00
host-bridge.c PCI: add host bridge release support 2012-04-30 14:52:43 -06:00
hotplug-pci.c PCI: hotplug: remove pci_do_scan_bus() 2012-06-13 15:42:27 -06:00
htirq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
ioapic.c PCI changes for the v3.8 merge window: 2012-12-13 12:14:47 -08:00
iov.c PCI: Finish SR-IOV VF setup before adding the device 2013-07-21 18:21:30 -07:00
irq.c PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-07 15:24:18 -07:00
Kconfig PCI: Drop bogus default from ARCH_SUPPORTS_MSI 2012-09-10 16:49:52 -06:00
Makefile PCI: Always build setup-bus when PCI is enabled 2012-11-28 13:00:58 -08:00
msi.c PCI/MSI: Add device flag indicating that 64-bit MSIs don't work 2014-12-06 15:05:47 -08:00
of.c
pci-acpi.c PCI / ACPI / PM: Clear pme_poll for devices in D3cold on wakeup 2013-10-01 09:17:45 -07:00
pci-driver.c PCI: Generate uppercase hex for modalias var in uevent 2015-03-06 14:40:48 -08:00
pci-label.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
pci-stub.c PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-07 15:24:18 -07:00
pci-sysfs.c PCI: Generate uppercase hex for modalias interface class 2014-10-30 09:35:12 -07:00
pci.c PCI: Fix incorrect vgaarb conditional in WARN_ON() 2014-07-06 18:54:13 -07:00
pci.h PCI / ACPI: Use boot-time resource allocation rules during hotplug 2013-06-23 01:01:35 +02:00
probe.c PCI: Restore detection of read-only BARs 2015-01-16 06:59:00 -08:00
proc.c proc: Supply a function to remove a proc entry by PDE 2013-05-01 17:29:46 -04:00
quirks.c PCI: Increase IBM ipr SAS Crocodile BARs to at least system page size 2014-10-30 09:35:12 -07:00
remove.c PCI: Add pcibios hooks for adding and removing PCI buses 2013-04-12 15:38:25 -06:00
rom.c PCI: Fix infinite loop with ROM image of size 0 2015-03-06 14:40:48 -08:00
search.c PCI: Fix reference count leak in pci_dev_present() 2013-01-25 13:49:27 -07:00
setup-bus.c PCI: Retry allocation of only the resource type that failed 2013-08-11 18:35:24 -07:00
setup-irq.c PCI: Provide a default pcibios_update_irq() 2012-09-18 17:28:21 -06:00
setup-res.c PCI: Remove unused variables 2013-04-15 10:56:27 -06:00
slot.c PCI: Warn about failures instead of "must_check" functions 2013-04-17 10:21:12 -06:00
syscall.c
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c xen/pcifront: Deal with toolstack missing 'XenbusStateClosing' state. 2013-07-21 18:21:27 -07:00