mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
ACPI: video: prevent NULL deref in acpi_get_pci_dev()
ref: http://thread.gmane.org/gmane.linux.kernel/857228/focus=857468 When the ACPI video driver initializes, it does a namespace walk looking for for supported devices. When we find an appropriate handle, we walk up the ACPI tree looking for a PCI root bus, and then walk back down the PCI bus, assuming that every device inbetween is a P2P bridge. This assumption is not correct, and is reported broken on at least: Dell Latitude E6400 ThinkPad X61 Dell XPS M1330 Add a NULL deref check to prevent boot panics. Reported-by: Alessandro Suardi <[email protected]> Signed-off-by: Troy Moure <[email protected]> Signed-off-by: Alex Chiang <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
3cd530b5aa
commit
412af97838
1 changed files with 1 additions and 1 deletions
|
|
@ -395,7 +395,7 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
|
|||
fn = adr & 0xffff;
|
||||
|
||||
pdev = pci_get_slot(pbus, PCI_DEVFN(dev, fn));
|
||||
if (hnd == handle)
|
||||
if (!pdev || hnd == handle)
|
||||
break;
|
||||
|
||||
pbus = pdev->subordinate;
|
||||
|
|
|
|||
Loading…
Reference in a new issue