projects
/
GitHub
/
LineageOS
/
android_hardware_samsung.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51af4fc
)
Fix crash on boot
cm-10.2
stable/cm-10.2
cm-10.2.1
author
Flamefire
<alex@grundis.de>
Mon, 20 Jan 2014 21:18:05 +0000
(22:18 +0100)
committer
Flamefire
<alex@grundis.de>
Mon, 20 Jan 2014 21:18:05 +0000
(22:18 +0100)
There is a race condition where the sysfs-vsync thread accesses a value
(in particular a function ptr) that may not have been set yet as this
is done externally.
Change-Id: If1afb1533344e994398b9b6f5bd3dfb125313416
exynos4/hal/libhwcomposer/SecHWC.cpp
patch
|
blob
|
blame
|
history
diff --git
a/exynos4/hal/libhwcomposer/SecHWC.cpp
b/exynos4/hal/libhwcomposer/SecHWC.cpp
index 18311250b184bb37f27daeed252b62b671dc5da7..0951ba35e9f3dcd46de8ef57962ef1060d10fc57 100644
(file)
--- a/
exynos4/hal/libhwcomposer/SecHWC.cpp
+++ b/
exynos4/hal/libhwcomposer/SecHWC.cpp
@@
-965,7
+965,8
@@
static void *hwc_vsync_sysfs_loop(void *data)
do {
ssize_t len = read(vsync_timestamp_fd, buf, sizeof(buf));
timestamp = strtoull(buf, NULL, 0);
- ctx->procs->vsync(ctx->procs, 0, timestamp);
+ if(ctx->procs && ctx->procs->vsync)
+ ctx->procs->vsync(ctx->procs, 0, timestamp);
select(vsync_timestamp_fd + 1, NULL, NULL, &exceptfds, NULL);
lseek(vsync_timestamp_fd, 0, SEEK_SET);
} while (1);