wcmSingleFingerTap() is called during SIGIO, calling TimerSet(NULL, ...) will malloc inside the signal handler and hang the box.
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- src/wcmConfig.c | 2 ++ src/wcmTouchFilter.c | 2 +- src/xf86WacomDefs.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wcmConfig.c b/src/wcmConfig.c index 157d9d3..24ec85b 100644 --- a/src/wcmConfig.c +++ b/src/wcmConfig.c @@ -102,6 +102,7 @@ static int wcmAllocate(InputInfoPtr pInfo) /* timers */ priv->serial_timer = TimerSet(NULL, 0, 0, NULL, NULL); + priv->tap_timer = TimerSet(NULL, 0, 0, NULL, NULL); return 1; @@ -125,6 +126,7 @@ static void wcmFree(InputInfoPtr pInfo) return; TimerFree(priv->serial_timer); + TimerFree(priv->tap_timer); free(priv->tool); wcmFreeCommon(&priv->common); free(priv); diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c index d25608b..bf0ecec 100644 --- a/src/wcmTouchFilter.c +++ b/src/wcmTouchFilter.c @@ -201,7 +201,7 @@ static void wcmSingleFingerTap(WacomDevicePtr priv) common->wcmGestureMode = GESTURE_PREDRAG_MODE; /* Delay to detect possible drag operation */ - TimerSet(NULL, 0, common->wcmGestureParameters.wcmTapTime, wcmSingleFingerTapTimer, priv); + TimerSet(priv->tap_timer, 0, common->wcmGestureParameters.wcmTapTime, wcmSingleFingerTapTimer, priv); } } } diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h index 45970dc..38a0411 100644 --- a/src/xf86WacomDefs.h +++ b/src/xf86WacomDefs.h @@ -304,6 +304,7 @@ struct _WacomDeviceRec int isParent; /* set to 1 if the device is not auto-hotplugged */ OsTimerPtr serial_timer; /* timer used for serial number property update */ + OsTimerPtr tap_timer; /* timer used for tap timing */ }; /****************************************************************************** -- 1.7.11.2 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel