From 19962694af6be4d831969239957b262085ef819ce5653b2753c674c4272c073d Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 22 Sep 2009 21:57:35 +0000 Subject: [PATCH] Accepting request 20674 from X11:XOrg Copy from X11:XOrg/xorg-x11-server based on submit request 20674 from user mhopf OBS-URL: https://build.opensuse.org/request/show/20674 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=141 --- ...fault-on-resume-with-intel-KMS-due-t.patch | 66 ++----------------- xorg-x11-server.changes | 5 ++ xorg-x11-server.spec | 2 +- 3 files changed, 13 insertions(+), 60 deletions(-) diff --git a/0001-Fix-sporadic-segfault-on-resume-with-intel-KMS-due-t.patch b/0001-Fix-sporadic-segfault-on-resume-with-intel-KMS-due-t.patch index 7316b55..4f011f0 100644 --- a/0001-Fix-sporadic-segfault-on-resume-with-intel-KMS-due-t.patch +++ b/0001-Fix-sporadic-segfault-on-resume-with-intel-KMS-due-t.patch @@ -1,68 +1,16 @@ -From 1efa035209aea97d452d829e29af2e5f1ac94272 Mon Sep 17 00:00:00 2001 -From: Matthias Hopf -Date: Fri, 4 Sep 2009 17:32:45 +0200 -Subject: [PATCH] Work around sporadic segfault on resume with intel/KMS due to cursor->bits == NULL. - -Apparently SavedCursor is sometime tried to be set while already being set. ---- - hw/xfree86/modes/xf86Cursors.c | 8 ++++++++ - hw/xfree86/ramdac/xf86Cursor.c | 17 ++++++++++------- - 2 files changed, 18 insertions(+), 7 deletions(-) - diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c -index 8c5a94c..3436636 100644 +index fc4df84..385848b 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c -@@ -461,6 +461,10 @@ xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor) - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); - xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; - -+ if (xf86_config->cursor == cursor) { -+ xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n"); -+ return FALSE; -+ } - if (xf86_config->cursor) - FreeCursor (xf86_config->cursor, None); - xf86_config->cursor = cursor; -@@ -480,6 +484,10 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor) +@@ -480,10 +480,10 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; -+ if (xf86_config->cursor == cursor) { -+ xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n"); -+ return FALSE; -+ } ++ ++cursor->refcnt; if (xf86_config->cursor) FreeCursor (xf86_config->cursor, None); xf86_config->cursor = cursor; -diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c -index 6b71f46..7aa7039 100644 ---- a/hw/xfree86/ramdac/xf86Cursor.c -+++ b/hw/xfree86/ramdac/xf86Cursor.c -@@ -209,13 +209,16 @@ xf86CursorEnableDisableFBAccess( - xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, xf86CursorScreenKey); - -- if (!enable && ScreenPriv->CurrentCursor != NullCursor) { -- CursorPtr currentCursor = ScreenPriv->CurrentCursor; -- xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x, -- ScreenPriv->y); -- ScreenPriv->isUp = FALSE; -- ScreenPriv->SWCursor = TRUE; -- ScreenPriv->SavedCursor = currentCursor; -+ if (!enable) { -+ if (ScreenPriv->CurrentCursor != NullCursor) { -+ CursorPtr currentCursor = ScreenPriv->CurrentCursor; -+ xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x, -+ ScreenPriv->y); -+ ScreenPriv->isUp = FALSE; -+ ScreenPriv->SWCursor = TRUE; -+ ScreenPriv->SavedCursor = currentCursor; -+ } else -+ ScreenPriv->SavedCursor = NULL; - } - - if (ScreenPriv->EnableDisableFBAccess) --- -1.6.0.2 - +- ++cursor->refcnt; + + /* Make sure ARGB support is available */ + if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0) diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index be4fe05..6fc5479 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 21 16:46:38 CEST 2009 - mhopf@novell.com + +- Less intrusive fix for server segfault. Should fix fdo #24010 (memleak). + ------------------------------------------------------------------- Thu Sep 10 15:44:07 CEST 2009 - sndirsch@suse.de diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 885aae5..488b0b9 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -33,7 +33,7 @@ BuildRequires: libjpeg-devel Url: http://xorg.freedesktop.org/ %define EXPERIMENTAL 0 Version: 7.4 -Release: 53 +Release: 54 License: GPL v2 or later ; MIT License (or similar) BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Servers/XF86_4