diff options
author | Flamefire <alex@grundis.de> | 2014-01-20 22:18:05 +0100 |
---|---|---|
committer | Flamefire <alex@grundis.de> | 2014-01-28 17:21:20 +0100 |
commit | 5d0cdb761cc3c622d3c9ee8a5217c88a95dcb097 (patch) | |
tree | d34d781e2637ff65ae6d748d74aec8d412a9a782 /exynos4 | |
parent | e1b1ffd5fceb0c67b8fda417032fb5bfb19f0951 (diff) | |
download | hardware_samsung-5d0cdb761cc3c622d3c9ee8a5217c88a95dcb097.tar.gz hardware_samsung-5d0cdb761cc3c622d3c9ee8a5217c88a95dcb097.tar.bz2 hardware_samsung-5d0cdb761cc3c622d3c9ee8a5217c88a95dcb097.zip |
Fix crash on boot
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
Diffstat (limited to 'exynos4')
-rw-r--r-- | exynos4/hal/libhwcomposer/SecHWC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/exynos4/hal/libhwcomposer/SecHWC.cpp b/exynos4/hal/libhwcomposer/SecHWC.cpp index 1831125..b652837 100644 --- 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, 0, timestamp); select(vsync_timestamp_fd + 1, NULL, NULL, &exceptfds, NULL); lseek(vsync_timestamp_fd, 0, SEEK_SET); } while (1); |