rpms/xorg-x11-server/F-12 xserver-1.7.4-reset-sli-pointers.patch, NONE, 1.1 xorg-x11-server.spec, 1.519, 1.520
Peter Hutterer
whot at fedoraproject.org
Wed Jan 13 23:14:54 UTC 2010
Author: whot
Update of /cvs/pkgs/rpms/xorg-x11-server/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7008
Modified Files:
xorg-x11-server.spec
Added Files:
xserver-1.7.4-reset-sli-pointers.patch
Log Message:
* Thu Jan 14 2010 Peter Hutterer <peter.hutterer at redhat.com> 1.7.4-3
- xserver-1.7.4-reset-sli-pointers.patch: reset the server LED indicator
pointers after device class copying (#540584)
xserver-1.7.4-reset-sli-pointers.patch:
exevents.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
--- NEW FILE xserver-1.7.4-reset-sli-pointers.patch ---
>From 11eea736f44a236dde884b52ad51cb5d1271b7a5 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed, 13 Jan 2010 15:03:45 +1000
Subject: [PATCH] Xi: reset the sli pointers after copying device classes. (#25640)
If the indicator flags have the XkbSLI_IsDefault bit set, the indicator map
and names aren't their own bit of memory but rather point into the
device->key->xkbInfo->desc structure. XkbCopySrvLedInfo knows about this and
leaves the pointers alone.
When copying the classes from the slave to the master, these pointers are
copied and still point to the dev->key class of the slave device. If the
slave device is removed, the memory becomes invalid and a call to modify
this data (e.g. XkbSetIndicators) may cause a deadlock.
The copying of dev->key relies on dev->kbdfeed to be already set up. Hence
the pointers need to be reset once _both_ kbdfeed and key have been copied
into the master device.
X.Org Bug 25640 <http://bugs.freedesktop.org/show_bug.cgi?id=25640>
Fedora Bug 540584 <https://bugzilla.redhat.com/show_bug.cgi?id=540584>
---
Xi/exevents.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index cb2452b..ee32ba8 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -444,6 +444,26 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to)
to->key = NULL;
}
+ /* If a SrvLedInfoPtr's flags are XkbSLI_IsDefault, the names and maps
+ * pointer point into the xkbInfo->desc struct. XkbCopySrvLedInfo
+ * didn't update the pointers so we need to do it manually here.
+ */
+ if (to->kbdfeed)
+ {
+ KbdFeedbackPtr k;
+
+ for (k = to->kbdfeed; k; k = k->next)
+ {
+ if (!k->xkb_sli)
+ continue;
+ if (k->xkb_sli->flags & XkbSLI_IsDefault)
+ {
+ k->xkb_sli->names = to->key->xkbInfo->desc->names->indicators;
+ k->xkb_sli->maps = to->key->xkbInfo->desc->indicators->maps;
+ }
+ }
+ }
+
/* We can't just copy over the focus class. When an app sets the focus,
* it'll do so on the master device. Copying the SDs focus means losing
* the focus.
--
1.6.6
Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-12/xorg-x11-server.spec,v
retrieving revision 1.519
retrieving revision 1.520
diff -u -p -r1.519 -r1.520
--- xorg-x11-server.spec 13 Jan 2010 17:14:40 -0000 1.519
+++ xorg-x11-server.spec 13 Jan 2010 23:14:54 -0000 1.520
@@ -19,7 +19,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.7.4
-Release: 2%{dist}
+Release: 3%{dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@@ -87,6 +87,8 @@ Patch6067: xserver-1.7.3-exa-master.patc
# FIXME: merged upstream, but not quite correct yet
Patch6069: xserver-1.7.3-cursor-jumps.patch
Patch6070: xserver-1.7.3-no-free-on-abort.patch
+# 540584
+Patch6071: xserver-1.7.4-reset-sli-pointers.patch
%define moduledir %{_libdir}/xorg/modules
%define drimoduledir %{_libdir}/dri
@@ -518,6 +520,10 @@ rm -rf $RPM_BUILD_ROOT
%{xserver_source_dir}
%changelog
+* Thu Jan 14 2010 Peter Hutterer <peter.hutterer at redhat.com> 1.7.4-3
+- xserver-1.7.4-reset-sli-pointers.patch: reset the server LED indicator
+ pointers after device class copying (#540584)
+
* Wed Jan 13 2010 Adam Jackson <ajax at redhat.com> 1.7.4-2
- Add RHEL conditional for bodhi_flags
- Build with -z relro
More information about the scm-commits
mailing list