diff options
| author | Justin Philip <jphili@codeaurora.org> | 2013-12-30 18:55:37 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:25:27 -0700 |
| commit | 7ea3aa1732199216eb6aee30aa2fc147a778b80f (patch) | |
| tree | fd0a691501f386ae55c7bfeb21c3d36cb4d52fe9 /drivers | |
| parent | d4e1996a5ff30e76786b588964c3da1a492c3116 (diff) | |
msm: mdss: On sharing dma pipe increment pipe ref_cnt
When DMA pipe is being shared and if mdss_mdp_pipe_map is called,
there could be a race condition when the pipe being shared
is unmapped, will lead to map failure as map is used for operations
on pipe which are already having positive ref_cnt.
This can result in potential map failure and attempt to free of
unmapped pipe resulting in crash.
Hence in this scenario of shared pipe usage atomic_inc should
be used instead of mdss_mdp_pipe_map.
CRs-Fixed: 590736
Change-Id: Ibaba20ac96662b5cd8aba3585f10d9cfe6e72d22
Signed-off-by: Justin Philip <jphili@codeaurora.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c index bd1b90001d7b..27528423438f 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c @@ -531,7 +531,7 @@ static struct mdss_mdp_pipe *mdss_mdp_pipe_init(struct mdss_mdp_mixer *mixer, pipe = mdata->dma_pipes + mixer->num; if (pipe->mixer->type != MDSS_MDP_MIXER_TYPE_WRITEBACK) return NULL; - mdss_mdp_pipe_map(pipe); + atomic_inc(&pipe->ref_cnt); pr_debug("pipe sharing for pipe=%d\n", pipe->num); } else { pr_err("no %d type pipes available\n", type); |
