[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#681796: plan to NMU the fix



Hi Cyril,

Since there were no activity from the team and reported patch has fixed
the issue (at least for me and few others on the upstream bug report
page) I am planing to NMU it in 2-3 days into 5-days delayed
queue.

See git patch for this NMU attached

-- 
Yaroslav O. Halchenko
Postdoctoral Fellow,   Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
From e064dcaed6f9988901e1f844a6c8b61c8c4c7997 Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <debian@onerussian.com>
Date: Thu, 30 Aug 2012 12:14:20 -0400
Subject: [PATCH] Adopted patch http://patchwork.freedesktop.org/patch/11873
 to resolve segfaults upon suspend/resume (Closes: #681796)

---
 debian/changelog                                   |    8 ++++
 debian/patches/series                              |    1 +
 ...-DeviceOff-52496-backported-against-1.6.2.patch |   41 ++++++++++++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 debian/patches/synaptics-Reset-num_active_touches-on-DeviceOff-52496-backported-against-1.6.2.patch

diff --git a/debian/changelog b/debian/changelog
index 9801715..d21c22c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+xserver-xorg-input-synaptics (1.6.2-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Adopted patch http://patchwork.freedesktop.org/patch/11873 to resolve
+    segfaults upon suspend/resume (Closes: #681796)
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Thu, 30 Aug 2012 11:58:56 -0400
+
 xserver-xorg-input-synaptics (1.6.2-1) unstable; urgency=low
 
   * New upstream release, from the 1.6 branch.
diff --git a/debian/patches/series b/debian/patches/series
index d694f00..ab8344e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 #01-synaptics-dont-grab-if-not-on-current-VT.patch
 02-do-not-use-synaptics-for-keyboards.patch
+synaptics-Reset-num_active_touches-on-DeviceOff-52496-backported-against-1.6.2.patch
diff --git a/debian/patches/synaptics-Reset-num_active_touches-on-DeviceOff-52496-backported-against-1.6.2.patch b/debian/patches/synaptics-Reset-num_active_touches-on-DeviceOff-52496-backported-against-1.6.2.patch
new file mode 100644
index 0000000..70c0bb1
--- /dev/null
+++ b/debian/patches/synaptics-Reset-num_active_touches-on-DeviceOff-52496-backported-against-1.6.2.patch
@@ -0,0 +1,41 @@
+Author: Peter Hutterer 
+Subject: When disabling the device, reset num_active_touches to zero.
+
+ Otherwise, num_active_touches stays at the value it was on DeviceOff().
+ Future touches add to that value until the index may go past
+ priv->open_slots[].  That causes spurious memory corruption on touch ends.
+
+ And as of 55fc42e7c9b4948cadd4f98ef7b6a3b12e268e3e we ignore pre-existing
+ touches anyway.
+
+    Test-case:
+    - place num_touches fingers on the touchpad
+    - xinput disable <device>
+    - lift fingers
+    - xinput enable <device>
+    - place finger on device, num_active_touches is now (num_touches + 1)
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=52496
+Bug-Debian: http://bugs.debian.org/681796
+Last-Update: 2012-08-30
+
+--- a/src/synaptics.c
++++ b/src/synaptics.c
+@@ -1153,6 +1153,7 @@ SynapticsReset(SynapticsPrivate * priv)
+     priv->lastButtons = 0;
+     priv->prev_z = 0;
+     priv->prevFingers = 0;
++    priv->num_active_touches = 0;
+ #ifdef HAVE_MULTITOUCH
+     memset(priv->open_slots, 0, priv->num_slots * sizeof(int));
+ #endif
+@@ -3118,6 +3119,7 @@ UpdateTouchState(InputInfoPtr pInfo, str
+         if (hw->slot_state[i] == SLOTSTATE_OPEN) {
+             priv->open_slots[priv->num_active_touches] = i;
+             priv->num_active_touches++;
++            BUG_WARN(priv->num_active_touches > priv->num_slots);
+         }
+         else if (hw->slot_state[i] == SLOTSTATE_CLOSE) {
+             Bool found = FALSE;
-- 
1.7.10.4

Attachment: signature.asc
Description: Digital signature


Reply to: