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>
diff --git a/vsyncworker.cpp b/vsyncworker.cpp
index d431d2e..6ac016d 100644
--- a/vsyncworker.cpp
+++ b/vsyncworker.cpp
@@ -120,6 +120,7 @@
if (!enabled_) {
ret = WaitForSignalOrExitLocked();
if (ret == -EINTR) {
+ Unlock();
return;
}
}