[PATCH 0/3] Make timers even more resistant to signals

Peter Hutterer peter.hutterer at who-t.net
Wed Sep 26 21:48:10 PDT 2012

On Sat, Sep 22, 2012 at 09:28:34PM +0800, Daniel Kurtz wrote:
> X Input drivers, such as xf86-input-synaptics, tend to do all of their
> processing in a SIGIO signal handler.  This processing often involves
> creating, modifying or canceling a timer.  Any of these operations may
> modify the global "timers" array.  Therefore, all accesses of this global
> must be done in critical secitions during which signals are blocked.
> Otherwise, for example, a signal may clear the last timer between, which
> sets timers global to NULL, between the NULL check and checking "expires",
> which causes a SEGV.
> A previous patch protected write accesses.  However, this is not
> sufficient. Read accesses must also be protected from a signal
> occurring between when the timers is NULL checked and subsequent
> dereferences.
> This patchset also does some small clean up to the timer list processing.
> Although, the whole timer list should probably be rewritten someday
> using the more modern - and better tested - struct xorg_list...
> Daniel Kurtz (3):
>   os: block signals when accessing global timer list
>   os: refactor timer processing
>   os: refactor CheckAllTimers
>  os/WaitFor.c |   79 ++++++++++++++++++++++++++++++---------------------------
>  1 files changed, 42 insertions(+), 37 deletions(-)

Thanks, merged this into my tree. This should fix the remaining issues we're
seeing with synaptics.


More information about the xorg-devel mailing list