rpms/xorg-x11-drv-evdev/F-11 evdev-2.2.1-X_NONE.patch, NONE, 1.1 evdev-2.2.1-prealloc-timer.patch, NONE, 1.1 xorg-x11-drv-evdev.spec, 1.49, 1.50
Peter Hutterer
whot at fedoraproject.org
Thu Apr 16 04:03:22 UTC 2009
- Previous message (by thread): rpms/perl-HTML-FormFu/devel .cvsignore, 1.3, 1.4 perl-HTML-FormFu.spec, 1.5, 1.6 sources, 1.3, 1.4
- Next message (by thread): rpms/autofs/devel autofs-5.0.4-fix-lsb-init-script-header.patch, NONE, 1.1 autofs-5.0.4-fix-memory-leak-reading-ldap-master.patch, NONE, 1.1 autofs-5.0.4-fix-st_remove_tasks-locking.patch, NONE, 1.1 autofs-5.0.4-reset-flex-scanner-when-setting-buffer.patch, NONE, 1.1 autofs-5.0.4-use-percent-hack-for-master.patch, NONE, 1.1 autofs-5.0.4-zero-s_magic-is-valid.patch, NONE, 1.1 autofs.spec, 1.278, 1.279
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: whot
Update of /cvs/pkgs/rpms/xorg-x11-drv-evdev/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15566
Modified Files:
xorg-x11-drv-evdev.spec
Added Files:
evdev-2.2.1-X_NONE.patch evdev-2.2.1-prealloc-timer.patch
Log Message:
* Thu Apr 16 2009 Peter Hutterer <peter.hutterer at redhat.com> 2.2.1-3
- evdev-2.2.1-prealloc-timer.patch: prealloc the reopen timer to avoid mallocs
during sigio handling.
- evdev-2.2.1-X_NONE.patch: print read errors as _X_NONE to avoid mallocs
during sigio handling.
evdev-2.2.1-X_NONE.patch:
--- NEW FILE evdev-2.2.1-X_NONE.patch ---
>From 220e2dfb8f6aa08bd5f59e81c6883c057b945721 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu, 16 Apr 2009 13:23:50 +1000
Subject: [PATCH 2/2] Print read errors as X_NONE to avoid mallocs in the server.
Messages of type X_NONE are just passed down to the log files, everything else
gets the (EE) or (II) prefixed. Since this mallocs, we can't use it in the
signal handler.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index 6ef1316..c5772d1 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -578,15 +578,19 @@ EvdevReadInput(InputInfoPtr pInfo)
pEvdev->reopen_timer = TimerSet(pEvdev->reopen_timer, 0, 100, EvdevReopenTimer, pInfo);
}
} else if (errno != EAGAIN)
- xf86Msg(X_ERROR, "%s: Read error: %s\n", pInfo->name,
+ {
+ /* We use X_NONE here because it doesn't alloc */
+ xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name,
strerror(errno));
+ }
break;
}
+ /* The kernel promises that we always only read a complete
+ * event, so len != sizeof ev is an error. */
if (len % sizeof(ev[0])) {
- /* The kernel promises that we always only read a complete
- * event, so len != sizeof ev is an error. */
- xf86Msg(X_ERROR, "%s: Read error: %s\n", pInfo->name, strerror(errno));
+ /* We use X_NONE here because it doesn't alloc */
+ xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name, strerror(errno));
break;
}
--
1.6.2.2.447.g4afa7
evdev-2.2.1-prealloc-timer.patch:
--- NEW FILE evdev-2.2.1-prealloc-timer.patch ---
>From ddc126637404cb3d9356b7698779dcd8849f8718 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu, 16 Apr 2009 12:01:03 +1000
Subject: [PATCH 1/2] Pre-allocate the reopen timer so we don't allocate during sigio handling.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index 43a90be..6ef1316 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -572,8 +572,11 @@ EvdevReadInput(InputInfoPtr pInfo)
xf86RemoveEnabledDevice(pInfo);
close(pInfo->fd);
pInfo->fd = -1;
- pEvdev->reopen_left = pEvdev->reopen_attempts;
- pEvdev->reopen_timer = TimerSet(NULL, 0, 100, EvdevReopenTimer, pInfo);
+ if (pEvdev->reopen_timer)
+ {
+ pEvdev->reopen_left = pEvdev->reopen_attempts;
+ pEvdev->reopen_timer = TimerSet(pEvdev->reopen_timer, 0, 100, EvdevReopenTimer, pInfo);
+ }
} else if (errno != EAGAIN)
xf86Msg(X_ERROR, "%s: Read error: %s\n", pInfo->name,
strerror(errno));
@@ -1246,7 +1249,7 @@ EvdevOn(DeviceIntPtr device)
if (pInfo->fd == -1)
{
pEvdev->reopen_left = pEvdev->reopen_attempts;
- pEvdev->reopen_timer = TimerSet(NULL, 0, 100, EvdevReopenTimer, pInfo);
+ pEvdev->reopen_timer = TimerSet(pEvdev->reopen_timer, 0, 100, EvdevReopenTimer, pInfo);
} else
{
pEvdev->min_maj = EvdevGetMajorMinor(pInfo);
@@ -1257,6 +1260,8 @@ EvdevOn(DeviceIntPtr device)
return !Success;
}
+ pEvdev->reopen_timer = TimerSet(pEvdev->reopen_timer, 0, 0, NULL, NULL);
+
xf86FlushInput(pInfo->fd);
xf86AddEnabledDevice(pInfo);
EvdevMBEmuOn(pInfo);
--
1.6.2.2.447.g4afa7
Index: xorg-x11-drv-evdev.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-evdev/F-11/xorg-x11-drv-evdev.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- xorg-x11-drv-evdev.spec 6 Apr 2009 00:53:12 -0000 1.49
+++ xorg-x11-drv-evdev.spec 16 Apr 2009 04:02:52 -0000 1.50
@@ -7,7 +7,7 @@
Summary: Xorg X11 evdev input driver
Name: xorg-x11-drv-evdev
Version: 2.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -18,6 +18,8 @@
#Source1: make-git-snapshot.sh
Patch1: evdev-2.2.1-read-deadlock.patch
+Patch2: evdev-2.2.1-prealloc-timer.patch
+Patch3: evdev-2.2.1-X_NONE.patch
ExcludeArch: s390 s390x
@@ -37,6 +39,8 @@
# apply patches
%patch1 -p1 -b .read-deadlock
+%patch2 -p1 -b .prealloc_timer
+%patch3 -p1 -b ._X_NONE
%build
autoreconf -v --install || exit 1
@@ -75,6 +79,12 @@
%changelog
+* Thu Apr 16 2009 Peter Hutterer <peter.hutterer at redhat.com> 2.2.1-3
+- evdev-2.2.1-prealloc-timer.patch: prealloc the reopen timer to avoid mallocs
+ during sigio handling.
+- evdev-2.2.1-X_NONE.patch: print read errors as _X_NONE to avoid mallocs
+ during sigio handling.
+
* Mon Apr 06 2009 Peter Hutterer <peter.hutterer at redhat.com> 2.2.1-2
- evdev-2.2.1-read-deadlock.patch: handle read errors on len <= 0 (#494245)
- Previous message (by thread): rpms/perl-HTML-FormFu/devel .cvsignore, 1.3, 1.4 perl-HTML-FormFu.spec, 1.5, 1.6 sources, 1.3, 1.4
- Next message (by thread): rpms/autofs/devel autofs-5.0.4-fix-lsb-init-script-header.patch, NONE, 1.1 autofs-5.0.4-fix-memory-leak-reading-ldap-master.patch, NONE, 1.1 autofs-5.0.4-fix-st_remove_tasks-locking.patch, NONE, 1.1 autofs-5.0.4-reset-flex-scanner-when-setting-buffer.patch, NONE, 1.1 autofs-5.0.4-use-percent-hack-for-master.patch, NONE, 1.1 autofs-5.0.4-zero-s_magic-is-valid.patch, NONE, 1.1 autofs.spec, 1.278, 1.279
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list