Blame SOURCES/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch
|
|
877270 |
From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001
|
|
|
877270 |
From: Eric Anholt <eric@anholt.net>
|
|
|
877270 |
Date: Fri, 26 Oct 2018 17:47:30 -0700
|
|
|
877270 |
Subject: [PATCH xserver] Fix segfault on probing a non-PCI platform device on
|
|
|
877270 |
a system with PCI.
|
|
|
877270 |
|
|
|
877270 |
Some Broadcom set-top-box boards have PCI busses, but the GPU is still
|
|
|
877270 |
probed through DT. We would dereference a null busid here in that
|
|
|
877270 |
case.
|
|
|
877270 |
|
|
|
877270 |
Signed-off-by: Eric Anholt <eric@anholt.net>
|
|
|
877270 |
---
|
|
|
877270 |
hw/xfree86/common/xf86platformBus.c | 2 +-
|
|
|
877270 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
877270 |
|
|
|
877270 |
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
|
|
877270 |
index cef47da03..dadbac6c8 100644
|
|
|
877270 |
--- a/hw/xfree86/common/xf86platformBus.c
|
|
|
877270 |
+++ b/hw/xfree86/common/xf86platformBus.c
|
|
|
877270 |
@@ -289,7 +289,7 @@ xf86platformProbe(void)
|
|
|
877270 |
for (i = 0; i < xf86_num_platform_devices; i++) {
|
|
|
877270 |
char *busid = xf86_platform_odev_attributes(i)->busid;
|
|
|
877270 |
|
|
|
877270 |
- if (pci && (strncmp(busid, "pci:", 4) == 0)) {
|
|
|
877270 |
+ if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
|
|
|
877270 |
platform_find_pci_info(&xf86_platform_devices[i], busid);
|
|
|
877270 |
}
|
|
|
877270 |
|
|
|
877270 |
--
|
|
|
877270 |
2.14.4
|
|
|
877270 |
|