Commit 4afe89fb authored by Dhaval Patel's avatar Dhaval Patel Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: fix race condition between vsync handler and ctl_stop



The ctl_stop and vsync_handler both can run in two different
threads. That can lead to race condition in vsync handler.
   -> Core 0: vsync handler thread checks the ctl power status
      and get preempted by other priority task.
   -> Core 1: processes the ctl_stop and power off the display
      device.
   -> Core 0: Vsync handler task gets chance to run again and
      tries to access the ctl->op members.

The third step leads to invalid structure member access because
display is already powered off. This race condition should be
fixed by moving all power state checks inside mutex lock.

Change-Id: I452c9026074acda2d00954e530fc491d395f106b
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent 00ce3769
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment