- U_modesetting-set-driverPrivate-to-NULL-after-closing-fd.patch:

modesetting: Avoid crash in FreeRec() by NULLing a pointer which
  may still be used (boo#981268).

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=637
This commit is contained in:
Egbert Eich 2016-05-24 06:28:38 +00:00 committed by Git OBS Bridge
parent 914368e75d
commit be28eab5b1
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,37 @@
From: Dave Airlie <airlied@gmail.com>
Date: Fri Apr 29 14:01:31 2016 +1000
Subject: [PATCH]modesetting: set driverPrivate to NULL after closing fd.
Patch-mainline: Upstream
Git-repo: git://anongit.freedesktop.org/git/xorg/xserver
Git-commit: a41a171bcbae9aeafac2865faa904f15d9b59925
References: boo#981268
Signed-off-by: Egbert Eich <eich@suse.com>
Otherwise ms_ent_priv will return NULL and things will fall apart.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
hw/xfree86/drivers/modesetting/driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index c97f33a..abf7e1a 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -635,7 +635,6 @@ FreeRec(ScrnInfoPtr pScrn)
ms = modesettingPTR(pScrn);
if (!ms)
return;
- pScrn->driverPrivate = NULL;
if (ms->fd > 0) {
modesettingEntPtr ms_ent;
@@ -656,6 +655,7 @@ FreeRec(ScrnInfoPtr pScrn)
ms_ent->fd = 0;
}
}
+ pScrn->driverPrivate = NULL;
free(ms->drmmode.Options);
free(ms);

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue May 24 06:20:16 UTC 2016 - eich@suse.com
- U_modesetting-set-driverPrivate-to-NULL-after-closing-fd.patch:
modesetting: Avoid crash in FreeRec() by NULLing a pointer which
may still be used (boo#981268).
-------------------------------------------------------------------
Mon May 16 19:53:50 UTC 2016 - eich@suse.com

View File

@ -216,6 +216,7 @@ Patch1228: U_ephyr-enable-option-sw-cursor-by-default-in-multi-se.patch
Patch1229: U_kdrive-introduce-input-hot-plugging-support-for-udev.patch
Patch1230: U_kdrive-add-options-to-set-default-XKB-properties.patch
Patch1232: U_config-udev-distinguish-between-real-keyboards-and-o.patch
Patch1233: U_modesetting-set-driverPrivate-to-NULL-after-closing-fd.patch
%description
This package contains the X.Org Server.
@ -356,6 +357,7 @@ sh %{SOURCE92} --verify . %{SOURCE91}
%patch1230 -p1
%patch1232 -p1
%patch1233 -p1
%build
test -e source-file-list || \