OBS User unknown 2006-12-20 10:41:50 +00:00 committed by Git OBS Bridge
parent 2446ea00f7
commit 66b841b648
4 changed files with 139 additions and 1 deletions

70
libXi-20061015090357.diff Normal file
View File

@ -0,0 +1,70 @@
commit 5dda1e1509d40ef64ebc816ce538cef462a4fa51
Author: Jamey Sharp <jamey@minilop.net>
Date: Sun Oct 15 00:03:57 2006 -0700
Don't call XInput_find_display in _XiGetExtensionVersion, while the Display lock is held.
_XiGetExtensionVersion has two callers. One had already called
XInput_find_display, and the other could easily do so outside the
Display lock. So I change the _XiGetExtensionVersion interface to
accept a previously-computed XExtDisplayInfo from the caller.
Besides being more correct, this should be slightly faster. :-)
Thanks to Magnus Kessler <Magnus.Kessler@gmx.net> for identifying
the bug and proposing a workaround.
diff --git a/src/XExtInt.c b/src/XExtInt.c
index e5baccb..aa838ef 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -207,7 +207,7 @@ _XiCheckExtInit(dpy, version_index)
return (-1);
}
((XInputData *) info->data)->vers =
- _XiGetExtensionVersion(dpy, "XInputExtension");
+ _XiGetExtensionVersion(dpy, "XInputExtension", info);
}
if (versions[version_index].major_version > Dont_Check) {
diff --git a/src/XGetVers.c b/src/XGetVers.c
index 1f4fd7a..ef41fea 100644
--- a/src/XGetVers.c
+++ b/src/XGetVers.c
@@ -64,9 +64,10 @@ XExtensionVersion *
XGetExtensionVersion(register Display * dpy, _Xconst char *name)
{
XExtensionVersion *ext;
+ XExtDisplayInfo *info = XInput_find_display(dpy);
LockDisplay(dpy);
- ext = _XiGetExtensionVersion(dpy, name);
+ ext = _XiGetExtensionVersion(dpy, name, info);
if (ext != (XExtensionVersion *) NoSuchExtension) {
UnlockDisplay(dpy);
SyncHandle();
@@ -75,12 +76,11 @@ XGetExtensionVersion(register Display *
}
XExtensionVersion *
-_XiGetExtensionVersion(register Display * dpy, _Xconst char *name)
+_XiGetExtensionVersion(register Display * dpy, _Xconst char *name, XExtDisplayInfo *info)
{
xGetExtensionVersionReq *req;
xGetExtensionVersionReply rep;
XExtensionVersion *ext;
- XExtDisplayInfo *info = XInput_find_display(dpy);
if (_XiCheckExtInit(dpy, Dont_Check) == -1)
return ((XExtensionVersion *) NoSuchExtension);
diff --git a/src/XIint.h b/src/XIint.h
index ba965a6..ae6d33f 100644
--- a/src/XIint.h
+++ b/src/XIint.h
@@ -12,6 +12,6 @@ extern XExtDisplayInfo *XInput_find_disp
extern int _XiCheckExtInit(Display *, int);
-extern XExtensionVersion *_XiGetExtensionVersion(Display *, _Xconst char *);
+extern XExtensionVersion *_XiGetExtensionVersion(Display *, _Xconst char *, XExtDisplayInfo *);
#endif

45
libXi-20061119100426.diff Normal file
View File

@ -0,0 +1,45 @@
commit 60dccd9a7be95e35b4b8c90934888efedfde84cc
Author: Jamey Sharp <jamey@minilop.net>
Date: Sun Nov 19 01:04:26 2006 -0800
Bug #8663: _XiCheckExtInit must drop the Display lock in all error cases.
diff --git a/src/XExtInt.c b/src/XExtInt.c
index 427e406..8366104 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -80,9 +80,6 @@ typedef struct _XInputData
XExtensionVersion *vers;
} XInputData;
-#define XInputCheckExtension(dpy,i,val) \
- XextCheckExtension (dpy, i, xinput_extension_name, val)
-
static /* const */ XExtensionHooks xinput_extension_hooks = {
NULL, /* create_gc */
NULL, /* copy_gc */
@@ -183,6 +180,12 @@ _xidevicebusy(dpy, error)
*error = info->codes->first_error + XI_DeviceBusy;
}
+static int XInputCheckExtension(Display *dpy, XExtDisplayInfo *info)
+{
+ XextCheckExtension (dpy, info, xinput_extension_name, 0);
+ return 1;
+}
+
/***********************************************************************
*
* Check to see if the input extension is installed in the server.
@@ -198,7 +201,10 @@ _XiCheckExtInit(dpy, version_index, info
{
XExtensionVersion *ext;
- XInputCheckExtension(dpy, info, -1);
+ if (!XInputCheckExtension(dpy, info)) {
+ UnlockDisplay(dpy);
+ return (-1);
+ }
if (info->data == NULL) {
info->data = (XPointer) Xmalloc(sizeof(XInputData));

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Dec 20 04:50:19 CET 2006 - sndirsch@suse.de
- libXi-20061015090357.diff:
* Don't call XInput_find_display in _XiGetExtensionVersion,
while the Display lock is held (X.Org Bug #8581/9392)
- libXi-20061119100426.diff:
* _XiCheckExtInit must drop the Display lock in all
error cases (X.Org Bug #8663)
-------------------------------------------------------------------
Sun Dec 17 12:08:36 CET 2006 - sndirsch@suse.de

View File

@ -19,7 +19,7 @@ Provides: libXaw.so.8 libXaw.so.7 libXaw.so.6
%endif
URL: http://xorg.freedesktop.org/
Version: 7.2
Release: 26
Release: 27
License: X11/MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/Libraries
@ -57,6 +57,8 @@ Patch2: libXft-2.1.7-lcd-filter-2.patch
Patch3: p_xft_cjk.diff
Patch4: p_xft_register.diff
Patch5: libxkbui.diff
Patch6: libXi-20061015090357.diff
Patch7: libXi-20061119100426.diff
%description
This package contains the remaining X.Org libraries.
@ -135,6 +137,10 @@ popd
pushd libxkbui-*
%patch5
popd
pushd libXi-*
%patch6 -p1
%patch7 -p1
popd
%build
for dir in libXft1-* xbitmaps-* $(ls | grep -v -e libXft1 -e xbitmaps); do
@ -199,6 +205,13 @@ exit 0
%{_mandir}/man3/*
%changelog -n xorg-x11-libs
* Wed Dec 20 2006 - sndirsch@suse.de
- libXi-20061015090357.diff:
* Don't call XInput_find_display in _XiGetExtensionVersion,
while the Display lock is held (X.Org Bug #8581/9392)
- libXi-20061119100426.diff:
* _XiCheckExtInit must drop the Display lock in all
error cases (X.Org Bug #8663)
* Sun Dec 17 2006 - sndirsch@suse.de
- updated libXScrnSaver to release 1.1.2
* Makefile.am: make ChangeLog hook safer