From a5e2b29373fd38bb173813a0a04f575079b07735 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Apr 17 2009 01:06:36 +0000 Subject: * Fri Apr 17 2009 Peter Hutterer 1.6.1-5 - xserver-1.6.1-activate-device.patch: remove the device if activation fails. This fixes crashes if wacom tablets are added through hal _and_ have an xorg.conf section. --- diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index c1082c9..6f6d9e9 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -19,7 +19,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.6.1 -Release: 4%{?dist} +Release: 5%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -107,6 +107,9 @@ Patch6030: xserver-1.6.0-randr-xinerama-crash.patch Patch6031: xserver-1.6.1-exa-avoid-swapped-out.patch Patch6032: xserver-1.6.1-randr-gamma.patch +# Nominated for 1.6.2 +Patch6033: xserver-1.6.1-activate-device.patch + %define moduledir %{_libdir}/xorg/modules %define drimoduledir %{_libdir}/dri %define sdkdir %{_includedir}/xorg @@ -537,6 +540,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Apr 17 2009 Peter Hutterer 1.6.1-5 +- xserver-1.6.1-activate-device.patch: remove the device if activation fails. + This fixes crashes if wacom tablets are added through hal _and_ have an + xorg.conf section. + * Thu Apr 16 2009 Adam Jackson 1.6.1-4 - xserver-1.6.1-randr-gamma.patch: Hook up XF86VidMode's gamma control to RANDR's per-crtc gamma controls. diff --git a/xserver-1.6.1-activate-device.patch b/xserver-1.6.1-activate-device.patch new file mode 100644 index 0000000..deef5eb --- /dev/null +++ b/xserver-1.6.1-activate-device.patch @@ -0,0 +1,32 @@ +From efa31092d6703397121a0ada4f7205a8ecad3d3d Mon Sep 17 00:00:00 2001 +From: Ander Conselvan de Oliveira +Date: Mon, 6 Apr 2009 16:01:20 -0300 +Subject: [PATCH] xfree86: Remove device from inputInfo.devices if ActivateDevice failed. + +After the call to xf86ActivateDevice, the new device will be added to +inputInfo.devices. However, if the subsequent call to ActivateDevice +fails, the correponding InputInfoRec for the device is deleted but an +entry still remains in inputInfo.devices. This might lead to a server +crash later on (on InitAndStartDevices for instance) when the device +control proc would be called for an invalid device. + +Signed-off-by: Peter Hutterer +--- + hw/xfree86/common/xf86Xinput.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c +index 3d89e39..8d08d7e 100644 +--- a/hw/xfree86/common/xf86Xinput.c ++++ b/hw/xfree86/common/xf86Xinput.c +@@ -543,7 +543,10 @@ xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable) + dev = pInfo->dev; + rval = ActivateDevice(dev); + if (rval != Success) ++ { ++ RemoveDevice(dev); + goto unwind; ++ } + + /* Enable it if it's properly initialised and we're currently in the VT */ + if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema)