[packages/xorg-xserver-server] upstream fix for crash in platform probe; rel 3

atler atler at pld-linux.org
Thu Aug 27 13:23:17 CEST 2020


commit bae77c3a2cebaad8ef38bfeeb1ee887a2d9a6ab0
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Aug 27 13:19:30 2020 +0200

    upstream fix for crash in platform probe; rel 3
    
    see https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068

 platform_probe_crash.patch | 31 +++++++++++++++++++++++++++++++
 xorg-xserver-server.spec   |  4 +++-
 2 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/xorg-xserver-server.spec b/xorg-xserver-server.spec
index a40cbce..453dd9c 100644
--- a/xorg-xserver-server.spec
+++ b/xorg-xserver-server.spec
@@ -35,7 +35,7 @@ Summary:	X.org server
 Summary(pl.UTF-8):	Serwer X.org
 Name:		xorg-xserver-server
 Version:	1.20.9
-Release:	2
+Release:	3
 License:	MIT
 Group:		X11/Servers
 Source0:	https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-%{version}.tar.bz2
@@ -50,6 +50,7 @@ Patch1:		%{name}-xwrapper-pam.patch
 Patch4:		%{name}-builtin-SHA1.patch
 
 Patch6:		110_nvidia_slowdow_fix.patch
+Patch7:		platform_probe_crash.patch
 URL:		https://xorg.freedesktop.org/
 BuildRequires:	Mesa-libGL-devel >= 7.8.1
 %{?with_dri2:BuildRequires:	Mesa-libGL-devel >= 9.2.0}
@@ -427,6 +428,7 @@ Biblioteka rozszerzenia GLX dla serwera X.org.
 %patch4 -p1
 
 %patch6 -p1
+%patch7 -p1
 
 # xserver uses pixman-1 API/ABI so put that explictly here
 sed -i -e 's#<pixman\.h#<pixman-1/pixman.h#g' ./fb/fb.h ./include/miscstruct.h ./render/picture.h
diff --git a/platform_probe_crash.patch b/platform_probe_crash.patch
new file mode 100644
index 0000000..114076e
--- /dev/null
+++ b/platform_probe_crash.patch
@@ -0,0 +1,31 @@
+From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric at anholt.net>
+Date: Fri, 26 Oct 2018 17:47:30 -0700
+Subject: [PATCH] Fix segfault on probing a non-PCI platform device on a system
+ with PCI.
+
+Some Broadcom set-top-box boards have PCI busses, but the GPU is still
+probed through DT.  We would dereference a null busid here in that
+case.
+
+Signed-off-by: Eric Anholt <eric at anholt.net>
+---
+ hw/xfree86/common/xf86platformBus.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
+index cef47da03d..dadbac6c8f 100644
+--- a/hw/xfree86/common/xf86platformBus.c
++++ b/hw/xfree86/common/xf86platformBus.c
+@@ -289,7 +289,7 @@ xf86platformProbe(void)
+     for (i = 0; i < xf86_num_platform_devices; i++) {
+         char *busid = xf86_platform_odev_attributes(i)->busid;
+ 
+-        if (pci && (strncmp(busid, "pci:", 4) == 0)) {
++        if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
+             platform_find_pci_info(&xf86_platform_devices[i], busid);
+         }
+ 
+-- 
+GitLab
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-xserver-server.git/commitdiff/bae77c3a2cebaad8ef38bfeeb1ee887a2d9a6ab0



More information about the pld-cvs-commit mailing list