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

Commit baf55717 authored by Ingrid Gallardo's avatar Ingrid Gallardo Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: fix race condition between two rotators and overlay off



Current code releases the rotator pipe only if the
active_session pointer in a session is not present,
problem is that there is a race condition where:
a rotator session 1 is in waiting state for another
rotator session 2 to finish the job; when this session 2
finishes the job, releases the active_session pointer
and signals the event to notify the other session 1,
but just before the session 1 receives the event, both
threads get preempted by a third thread (coming from
overlay off) which given the state of the SW, releases
the pipe allocated for the sessions; so next time that
session 1 is scheduled to run, it has no knowledge that
the pipe has been freed and a null pointer dereference
when trying to access the pipe happens.
To prevent this situation, add a check to make sure
there are no rotator sessions pending before releasing
the pipe.

Change-Id: I609a767d4789f13ef68c84c9e0bc69b71d6f84dd
Signed-off-by: default avatarIngrid Gallardo <ingridg@codeaurora.org>
parent f10c46ec
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