From: Michel Dänzer Date: Mon, 19 Jan 2015 08:53:20 +0000 (+0900) Subject: PCI: Fix infinite loop with ROM image of size 0 X-Git-Tag: fixes-v4.0-rc1~161^2~4^4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16b036af31e1456cb69243a5a0c9ef801ecd1f17;p=pandora-kernel.git PCI: Fix infinite loop with ROM image of size 0 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 Signed-off-by: Michel Dänzer Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher CC: stable@vger.kernel.org --- Reading git-diff-tree failed