[PATCH xserver 0/4] animcur: Stop using TimerAbsolute

Adam Jackson ajax at redhat.com
Mon Nov 6 20:19:50 UTC 2017


Rob Clark reported a crash where the animated cursor code would
infinitely recurse: the timer callback would call TimerSet, which would
try to run any timers that needed to run "now", which would re-trigger
the cursor callback, etc.

The TimerAbsolute mode seems like kind of a trap? The caller will
probably call GetTimeInMillis to figure out "now", but then TimerSet
will need to call it too to know how far in the future to schedule the
wakeup, which means you run the risk that the two calls will return
different values. That plus the awkward "walk every device" loop in the
update callback was enough justification for me to port the update code
to per-device instead of per-screen, hence this series.

I'm tempted to rip out the Absolute mode logic entirely at some point,
but in the meantime this probably fixes the recursion bug.

- ajax



More information about the xorg-devel mailing list