summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linaro.org>2020-09-08 12:31:12 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-09 10:11:57 +0100
commit34eee398f9ea8f0c57dfa476cdf2c91262b34893 (patch)
treeaed496860d77f48565d58240df1f68187e9381e9 /meta/recipes-graphics
parentb18c14046701d1241582713f81223feaa724952e (diff)
downloadpoky-34eee398f9ea8f0c57dfa476cdf2c91262b34893.tar.gz
recipes-graphics/xorg-xserver: Add patch to fix segfault when probe
Fix segfault on probing a non-PCI platform device on a system with PCI. ... at ../../xorg-server-1.20.9/os/log.c:1017 at ../../xorg-server-1.20.9/os/osinit.c:156 at ../../xorg-server-1.20.9/os/osinit.c:110 at ../../../../xorg-server-1.20.9/hw/xfree86/common/xf86platformBus.c:292 argv=argv@entry=0xffffca43c7c8) at ../../../../xorg-server-1.20.9/hw/xfree86/common/xf86Init.c:388 at ../../xorg-server-1.20.9/dix/main.c:193 init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:314 ... Backported from upstream rev e50c85f4e. (From OE-Core rev: 3b37cbd53219d9c10640b462aa91991d8cbc2a23) Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch34
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.9.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch
new file mode 100644
index 0000000000..7b9e3b4cad
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch
@@ -0,0 +1,34 @@
1From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001
2From: Eric Anholt <eric@anholt.net>
3Date: Fri, 26 Oct 2018 17:47:30 -0700
4Subject: [PATCH] Fix segfault on probing a non-PCI platform device on a system
5 with PCI.
6
7Some Broadcom set-top-box boards have PCI busses, but the GPU is still
8probed through DT. We would dereference a null busid here in that
9case.
10
11Signed-off-by: Eric Anholt <eric@anholt.net>
12
13Upstream-status: Backport [https://github.com/freedesktop/xorg-xserver/commit/e50c85f4e]
14Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
15---
16 hw/xfree86/common/xf86platformBus.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
20index cef47da03..dadbac6c8 100644
21--- a/hw/xfree86/common/xf86platformBus.c
22+++ b/hw/xfree86/common/xf86platformBus.c
23@@ -289,7 +289,7 @@ xf86platformProbe(void)
24 for (i = 0; i < xf86_num_platform_devices; i++) {
25 char *busid = xf86_platform_odev_attributes(i)->busid;
26
27- if (pci && (strncmp(busid, "pci:", 4) == 0)) {
28+ if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
29 platform_find_pci_info(&xf86_platform_devices[i], busid);
30 }
31
32--
332.28.0
34
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.9.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.9.bb
index 86d432a7c4..c83e43ed99 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.9.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.9.bb
@@ -6,6 +6,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
6 file://sdksyms-no-build-path.patch \ 6 file://sdksyms-no-build-path.patch \
7 file://0001-drmmode_display.c-add-missing-mi.h-include.patch \ 7 file://0001-drmmode_display.c-add-missing-mi.h-include.patch \
8 file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \ 8 file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \
9 file://0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch \
9 " 10 "
10SRC_URI[sha256sum] = "e219f2e0dfe455467939149d7cd2ee53b79b512cc1d2094ae4f5c9ed9ccd3571" 11SRC_URI[sha256sum] = "e219f2e0dfe455467939149d7cd2ee53b79b512cc1d2094ae4f5c9ed9ccd3571"
11 12