summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>2018-03-27 14:09:17 +0100
committerAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>2018-05-08 10:37:41 +0100
commitacb630368da8c0f1ff16da5d071e8851b0af3a2d (patch)
tree3c08a3bd4511f14cd36a371d605f3d0ea48c9f98
parent02346787b1517a70d675b48e947f472a37bdebe0 (diff)
drm_hwcomposer: vsyncworker: Fix deadlock on exit path
vsyncworker::Routine assumes that when -EINTR is returned by WaitForSignalOrExitLocked the lock as been released, which is not true, so it hangs if a vsyncworker is never enabled and Exit is called. Fixed by releasing lock in vsynworker::Routine on all code paths. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
-rw-r--r--vsyncworker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/vsyncworker.cpp b/vsyncworker.cpp
index d431d2e..6ac016d 100644
--- a/vsyncworker.cpp
+++ b/vsyncworker.cpp
@@ -120,6 +120,7 @@ void VSyncWorker::Routine() {
if (!enabled_) {
ret = WaitForSignalOrExitLocked();
if (ret == -EINTR) {
+ Unlock();
return;
}
}