ChangeLog | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 - debian/changelog | 7 ++++++ src/xf86Aiptek.c | 28 ++++++++++++++++++------ 4 files changed, 91 insertions(+), 8 deletions(-)
New commits: commit b9789bdbd289483baaa70873d0e102db759d2ae2 Author: Timo Aaltonen <[email protected]> Date: Wed Jun 29 12:45:28 2011 +0300 Update the changelogs. diff --git a/ChangeLog b/ChangeLog index 415459b..4fa8513 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,65 @@ +commit 2edeeb998a55c5f4d6e7ebda2bbd9d075c1f81c6 +Author: Peter Hutterer <[email protected]> +Date: Wed Jun 29 10:26:59 2011 +1000 + + aiptek 1.4.1 + + Signed-off-by: Peter Hutterer <[email protected]> + +commit dc276f43b3ad03437635cc125de5905ec403c15d +Author: Peter Hutterer <[email protected]> +Date: Wed Jun 29 09:58:40 2011 +1000 + + Remove references to other devices after shutdown. + + deviceArray keeps a ref to each InputInfoPtr this driver (on this device) + handles. These need to be unset and removed, otherwise an event coming in + after the shutdown of one device may dereference an invalid pointer. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 62413b8a00a837d28b6135d752ed5bdb0aa3f162 +Author: Peter Hutterer <[email protected]> +Date: Wed Jun 29 09:47:17 2011 +1000 + + Don't rely on freed memory to keep values. + + Setting Capacity to a magic value, then freeing the struct and hoping that + the next Uninit call still has the right value in it is hopeful at best. + Use the refcounting that we already have in the driver instead. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 51cf6923be5502cb491fe6d1df1dc8b9a410ce87 +Author: Peter Hutterer <[email protected]> +Date: Mon Jun 27 03:48:06 2011 +1000 + + Don't pretend successfully opening the device is an error. + + I mean, you shouldn't be running this driver and all, but still - + success is success. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit b48e5e47ba5c952c8a7a6aeb08d875be8682fe32 +Author: Peter Hutterer <[email protected]> +Date: Mon Jun 27 03:37:01 2011 +1000 + + Only free the device->common if we actually have a device. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit d494cb0107dfb618e5fda70994bbec7d0855b231 +Author: Peter Hutterer <[email protected]> +Date: Mon Jun 27 03:34:59 2011 +1000 + + Don't call DEVICE_OFF in UnInit. + + The server guarantees that if we ever hit this bit, the device is + already off. + + Signed-off-by: Peter Hutterer <[email protected]> + commit 8a8693bda6e8a7d4acbf0e680570d45f71b122cc Author: Cyril Brulebois <[email protected]> Date: Wed May 4 03:18:44 2011 +0200 diff --git a/debian/changelog b/debian/changelog index fcfad0b..ea0b61f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-input-aiptek (1:1.4.1-1) UNRELEASED; urgency=low + + * New upstream release: + - Fix issues on shutdown. + + -- Timo Aaltonen <[email protected]> Wed, 29 Jun 2011 12:44:09 +0300 + xserver-xorg-input-aiptek (1:1.4.0-1) unstable; urgency=low * New upstream release: commit 2edeeb998a55c5f4d6e7ebda2bbd9d075c1f81c6 Author: Peter Hutterer <[email protected]> Date: Wed Jun 29 10:26:59 2011 +1000 aiptek 1.4.1 Signed-off-by: Peter Hutterer <[email protected]> diff --git a/configure.ac b/configure.ac index f13daff..5081dd2 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-input-aiptek], - [1.4.0], + [1.4.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-aiptek]) AC_CONFIG_SRCDIR([Makefile.am]) commit dc276f43b3ad03437635cc125de5905ec403c15d Author: Peter Hutterer <[email protected]> Date: Wed Jun 29 09:58:40 2011 +1000 Remove references to other devices after shutdown. deviceArray keeps a ref to each InputInfoPtr this driver (on this device) handles. These need to be unset and removed, otherwise an event coming in after the shutdown of one device may dereference an invalid pointer. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c index d41f890..a68814f 100644 --- a/src/xf86Aiptek.c +++ b/src/xf86Aiptek.c @@ -1785,9 +1785,21 @@ xf86AiptekUninit(InputDriverPtr drv, { if (device->common) { - device->common->numDevices--; - if (device->common->numDevices == 0) - free(device->common); + AiptekCommonPtr common = device->common; + int i; + + common->numDevices--; + + for (i = 0; i < common->numDevices; i++) + { + if (common->deviceArray[i] == pInfo) + memmove(&common->deviceArray[i], + &common->deviceArray[i+1], + (common->numDevices - i) * sizeof(InputInfoPtr)); + } + + if (common->numDevices == 0) + free(common); } device->common = NULL; } commit 62413b8a00a837d28b6135d752ed5bdb0aa3f162 Author: Peter Hutterer <[email protected]> Date: Wed Jun 29 09:47:17 2011 +1000 Don't rely on freed memory to keep values. Setting Capacity to a magic value, then freeing the struct and hoping that the next Uninit call still has the right value in it is hopeful at best. Use the refcounting that we already have in the driver instead. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c index 6a4ba96..d41f890 100644 --- a/src/xf86Aiptek.c +++ b/src/xf86Aiptek.c @@ -1783,12 +1783,13 @@ xf86AiptekUninit(InputDriverPtr drv, if (device) { - if (device->common && device->common->xCapacity != -10101) + if (device->common) { - device->common->xCapacity = -10101; - free(device->common); + device->common->numDevices--; + if (device->common->numDevices == 0) + free(device->common); } - free (device); + device->common = NULL; } pInfo->private = NULL; xf86DeleteInput(pInfo, 0); commit 51cf6923be5502cb491fe6d1df1dc8b9a410ce87 Author: Peter Hutterer <[email protected]> Date: Mon Jun 27 03:48:06 2011 +1000 Don't pretend successfully opening the device is an error. I mean, you shouldn't be running this driver and all, but still - success is success. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c index 3a60d13..6a4ba96 100644 --- a/src/xf86Aiptek.c +++ b/src/xf86Aiptek.c @@ -1479,7 +1479,7 @@ xf86AiptekProc(DeviceIntPtr pAiptek, int requestCode) xf86Msg(X_ERROR, "Unable to open aiptek device\n"); return !Success; } - xf86Msg(X_ERROR, "Able to open aiptek device\n"); + xf86Msg(X_INFO, "Able to open aiptek device\n"); xf86AddEnabledDevice(pInfo); pAiptek->public.on = TRUE; } commit b48e5e47ba5c952c8a7a6aeb08d875be8682fe32 Author: Peter Hutterer <[email protected]> Date: Mon Jun 27 03:37:01 2011 +1000 Only free the device->common if we actually have a device. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c index 8421a70..3a60d13 100644 --- a/src/xf86Aiptek.c +++ b/src/xf86Aiptek.c @@ -1781,12 +1781,15 @@ xf86AiptekUninit(InputDriverPtr drv, DBG(1, "xf86AiptekUninit\n"); - if (device->common && device->common->xCapacity != -10101) + if (device) { - device->common->xCapacity = -10101; - free(device->common); + if (device->common && device->common->xCapacity != -10101) + { + device->common->xCapacity = -10101; + free(device->common); + } + free (device); } - free (device); pInfo->private = NULL; xf86DeleteInput(pInfo, 0); } commit d494cb0107dfb618e5fda70994bbec7d0855b231 Author: Peter Hutterer <[email protected]> Date: Mon Jun 27 03:34:59 2011 +1000 Don't call DEVICE_OFF in UnInit. The server guarantees that if we ever hit this bit, the device is already off. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c index d9a7665..8421a70 100644 --- a/src/xf86Aiptek.c +++ b/src/xf86Aiptek.c @@ -1781,8 +1781,6 @@ xf86AiptekUninit(InputDriverPtr drv, DBG(1, "xf86AiptekUninit\n"); - xf86AiptekProc(pInfo->dev, DEVICE_OFF); - if (device->common && device->common->xCapacity != -10101) { device->common->xCapacity = -10101; -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

