* Mon Dec 11 2006 Adam Jackson <ajax@redhat.com> 1.1.1-55

- xorg-x11-server-1.1.1-lid-close-crash.patch: Added, backport from head.
  (#197921)
This commit is contained in:
Adam Jackson 2006-12-11 21:22:32 +00:00
parent 6d44084f70
commit 01f5fa11e8
2 changed files with 18 additions and 31 deletions

View File

@ -1,46 +1,27 @@
--- xorg-server-1.1.1/hw/xfree86/os-support/linux/lnx_init.c.jx 2006-07-05 14:31:41.000000000 -0400
+++ xorg-server-1.1.1/hw/xfree86/os-support/linux/lnx_init.c 2006-09-26 17:53:04.000000000 -0400
@@ -248,14 +248,37 @@
--- xorg-server-1.1.1/hw/xfree86/os-support/linux/lnx_init.c.vt-activate 2006-07-05 14:31:41.000000000 -0400
+++ xorg-server-1.1.1/hw/xfree86/os-support/linux/lnx_init.c 2006-12-04 17:29:47.000000000 -0500
@@ -248,14 +248,20 @@
#endif
/*
* now get the VT
+ *
+ * There's a race here, in that if someone else does a VT_ACTIVATE
+ * between our ACTIVATE/WAITACTIVE, we might never get the VT.
+ * So, just spin until we do. There's really no fixing this,
+ * So we have to fail in that case. There's really no fixing this,
+ * it's a racy protocol.
*/
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed: %s\n",
- strerror(errno));
+ while (1) {
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
+ FatalError(X_WARNING,
+ "xf86OpenConsole: VT_ACTIVATE failed: %s\n",
+ strerror(errno));
+ FatalError("xf86OpenConsole: VT_ACTIVATE failed: %s\n",
+ strerror(errno));
+
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
- xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
- strerror(errno));
+
+ alarm(5);
+ if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
+ {
+ if (errno == EINTR) {
+ /* we lost the race and the alarm fired, try again */
+ xf86Msg(X_WARNING,
+ "Lost VT_WAITACTIVE race, retrying\n");
+ continue;
+ }
+
+ FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
+ strerror(errno));
+ }
+ /* success, turn off the alarm */
+ alarm(0);
+
+ break;
+ }
+ FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
+ strerror(errno));
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",

View File

@ -8,7 +8,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.1.1
Release: 54.1%{?dist}
Release: 55%{?dist}
URL: http://www.x.org
License: MIT/X11
Group: User Interface/X
@ -34,6 +34,7 @@ Patch13: xorg-x11-server-1.1.1-ia64-int10.patch
Patch14: xorg-x11-server-1.1.1-ia64-pci-chipsets.patch
Patch15: xorg-x11-server-1.1.1-automake-1.10-fixes.patch
Patch16: xorg-x11-server-1.1.1-xkb-vidmode-switch.patch
Patch17: xorg-x11-server-1.1.1-lid-close-crash.patch
# OpenGL compositing manager feature/optimization patches.
Patch100: xorg-x11-server-1.1.0-no-move-damage.patch
@ -338,6 +339,7 @@ drivers, input drivers, or other X modules should install this package.
%patch14 -p1 -b .ia64-pci-chipsets
%patch15 -p1 -b .automake-1.10
%patch16 -p1 -b .xkb-vidmode-switch
%patch17 -p1 -b .lid-close-crash
%patch100 -p0 -b .no-move-damage
%patch101 -p0 -b .dont-backfill-bg-none
@ -681,6 +683,10 @@ rm -rf $RPM_BUILD_ROOT
# -------------------------------------------------------------------
%changelog
* Mon Dec 11 2006 Adam Jackson <ajax@redhat.com> 1.1.1-55
- xorg-x11-server-1.1.1-lid-close-crash.patch: Added, backport from head.
(#197921)
* Mon Dec 11 2006 Adam Tkac <atkac redhat com> 1.1.1-54.1.fc7
- fixed building against mesa-6.5.2