]> git.baikalelectronics.ru Git - kernel.git/commit
Fix pointer dereference before call to pcie_bus_configure_settings
authorShyam Iyer <shyam.iyer.t@gmail.com>
Thu, 8 Sep 2011 21:41:17 +0000 (16:41 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 10 Sep 2011 02:49:58 +0000 (19:49 -0700)
commitb76f2b4111d4728e16e783de910ecf230bcbbcd2
treefa0087ac08c4a914e8c3456741d57ddf27534b9a
parent5f30a04c674bf19b79c263a03b81b707f5f99fe0
Fix pointer dereference before call to pcie_bus_configure_settings

Commit 167d7d3c6039 ("PCI: Set PCI-E Max Payload Size on fabric")
introduced a potential NULL pointer dereference in calls to
pcie_bus_configure_settings due to attempts to access pci_bus self
variables when the self pointer is NULL.

To correct this, verify that the self pointer in pci_bus is non-NULL
before dereferencing it.

Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>
Signed-off-by: Jon Mason <mason@myri.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/pci/acpi.c
drivers/pci/hotplug/pcihp_slot.c
drivers/pci/probe.c