Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 948bd820 authored by Lina Iyer's avatar Lina Iyer
Browse files

drivers: qcom: rpmh: Wakeup only when the wait count is zero



Wakeup the waiting thread only when the wait count is zero. Currently,
if there are two responses coming back that use the same waitq object,
both of these threads would decrement the atomic wait_count variable and
then try to wakeup the waitq object. Since the wait count has been
decremented by both the threads, the waiting thread will see its
condition turning true and therefore would bail out releasing the waitq
object from the stack. The second thread that tries to acquire the waitq
and wake it up will crash.

Change-Id: Ie1f38df8341e3cb8cfca803e89c6d4a430626686
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent 1aa5d272
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment