summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-09-11 03:07:44 -0700
committerKeith Packard <keithp@keithp.com>2016-09-15 21:41:22 -0700
commitd81f9ce12aa4ac54b9c2b8c74c2f827c1f3e739a (patch)
treed16fc521749b9de9f2c8624ed86ae49baee1a1c6 /dix
parent265c4e66533243b60d92cffc7769ecadb0292c8d (diff)
dix/dispatch: Fix SmartScheduleClient interval adjustment to use best rather than pClient
pClient does not contain a live value after the transition to lists https://bugs.freedesktop.org/show_bug.cgi?id=97765 Application Specific Information: X.Org X Server 1.18.99.1 Build Date: 20160910 ================================================================= ==16921==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000108ce3834 at pc 0x000108880766 bp 0x7000045f76c0 sp 0x7000045f76b8 READ of size 4 at 0x000108ce3834 thread T6 #0 0x108880765 in SmartScheduleClient dispatch.c:365 #1 0x10887ecc5 in Dispatch dispatch.c:422 #2 0x1088c05f1 in dix_main main.c:301 #3 0x1082aabba in server_thread quartzStartup.c:66 #4 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa) #5 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6) #6 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc) Regressed-in: 8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
-rw-r--r--dix/dispatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 0edcfeea8..26a461b0d 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -362,7 +362,7 @@ SmartScheduleClient(void)
* has run, bump the slice up to get maximal
* performance from a single client
*/
- if ((now - pClient->smart_start_tick) > 1000 &&
+ if ((now - best->smart_start_tick) > 1000 &&
SmartScheduleSlice < SmartScheduleMaxSlice) {
SmartScheduleSlice += SmartScheduleInterval;
}