diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-26 14:31:47 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-26 14:31:47 -0700 |
commit | 4ebfddf2f23f334637b7982551158aa52b4924e9 (patch) | |
tree | 6643480cde9e85808172382e996bccd30a81634c | |
parent | 163b9cf5f8760200e4671f8cbbbf3f585acfa9a6 (diff) | |
download | stable-queue-4ebfddf2f23f334637b7982551158aa52b4924e9.tar.gz |
3.0 patches
-rw-r--r-- | queue-3.0/pci-don-t-crash-when-reading-mpss-from-root-complex.patch | 41 | ||||
-rw-r--r-- | queue-3.0/series | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/queue-3.0/pci-don-t-crash-when-reading-mpss-from-root-complex.patch b/queue-3.0/pci-don-t-crash-when-reading-mpss-from-root-complex.patch new file mode 100644 index 0000000000..9fcb7fdc48 --- /dev/null +++ b/queue-3.0/pci-don-t-crash-when-reading-mpss-from-root-complex.patch @@ -0,0 +1,41 @@ +From 1a4b1a41b8a3d5256019854e851beed063b34344 Mon Sep 17 00:00:00 2001 +From: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Tue, 13 Sep 2011 15:16:33 -0300 +Subject: pci: Don't crash when reading mpss from root complex + +From: Benjamin Herrenschmidt <benh@kernel.crashing.org> + +commit 1a4b1a41b8a3d5256019854e851beed063b34344 upstream. + +In pcie_find_smpss(), we have the following statement: + + if (dev->is_hotplug_bridge && (!list_is_singular(&dev->bus->devices) || + dev->bus->self->pcie_type != PCI_EXP_TYPE_ROOT_PORT)) + +The problem is that at least on my machine, this gets called for the +root complex (virtual P2P bridge), and dev->bus->self is NULL since +the parent bus for this is not itself anchor to a PCI device. + +This adds the necessary NULL check. + +Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Acked-by: Jon Mason <mason@myri.com> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/probe.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/pci/probe.c ++++ b/drivers/pci/probe.c +@@ -1352,7 +1352,8 @@ static int pcie_find_smpss(struct pci_de + * will occur as normal. + */ + if (dev->is_hotplug_bridge && (!list_is_singular(&dev->bus->devices) || +- dev->bus->self->pcie_type != PCI_EXP_TYPE_ROOT_PORT)) ++ (dev->bus->self && ++ dev->bus->self->pcie_type != PCI_EXP_TYPE_ROOT_PORT))) + *smpss = 0; + + if (*smpss > dev->pcie_mpss) diff --git a/queue-3.0/series b/queue-3.0/series index 8db4032424..2916c8022b 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -210,3 +210,4 @@ drm-radeon-kms-fix-ddia-enable-on-some-rs690-systems.patch alsa-fm801-fix-double-free-in-case-of-error-in-tuner-detection.patch alsa-fm801-gracefully-handle-failure-of-tuner-auto-detect.patch btrfs-fix-d_off-in-the-first-dirent.patch +pci-don-t-crash-when-reading-mpss-from-root-complex.patch |