Bug 10296 - [PATCH] Backward time adjustment or timestamp rewind may cause server lockup
Summary: [PATCH] Backward time adjustment or timestamp rewind may cause server lockup
Alias: None
Product: xorg
Classification: Unclassified
Component: Protocol/Core (show other bugs)
Version: git
Hardware: Other All
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Keywords: regression
Depends on:
Reported: 2007-03-14 15:00 UTC by Tomas Janousek
Modified: 2007-03-28 11:09 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

proposed fix (1.10 KB, patch)
2007-03-14 15:01 UTC, Tomas Janousek
no flags Details | Splinter Review

Description Tomas Janousek 2007-03-14 15:00:10 UTC
The commit bb7a39ac13731a80fc2d80487f9da760dd34c3ba introduced this regression.

The execution of timer callbacks in CheckAllTimes may (and does e.g. with synaptics) result in the timers being rescheduled or new timers being set. The TimerSet function uses current "now" value though. Therefore, subtracting the old "new" from the new timer's "expires" results in a higher value than "delta" + 250. As a result, the function CheckAllTimers never gets out of the goto loop.

I'm attaching a proposed fix.
Comment 1 Tomas Janousek 2007-03-14 15:01:00 UTC
Created attachment 9145 [details] [review]
proposed fix
Comment 2 Tomas Janousek 2007-03-28 10:59:58 UTC
A forgot to mention that it's nearly 100% reproducible with the synaptics driver which uses a periodic timer.
Comment 3 Adam Jackson 2007-03-28 11:09:08 UTC
Fixed in git master, and added to the 1.3 tracking page on the wiki.  Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.