diff options
| author | Jessica Zhang <[email protected]> | 2022-05-05 21:40:50 +0000 |
|---|---|---|
| committer | Dmitry Baryshkov <[email protected]> | 2022-05-06 23:10:35 +0000 |
| commit | d59be579fa932c46b908f37509f319cbd4ca9a68 (patch) | |
| tree | 2960188886c5b0d50afcab63fa232aa8fdf5e7fe /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | drm/msm/dp: fix event thread stuck in wait_event after kthread_stop() (diff) | |
| download | kernel-d59be579fa932c46b908f37509f319cbd4ca9a68.tar.gz kernel-d59be579fa932c46b908f37509f319cbd4ca9a68.zip | |
drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected
mdp5_get_global_state runs the risk of hitting a -EDEADLK when acquiring
the modeset lock, but currently mdp5_pipe_release doesn't check for if
an error is returned. Because of this, there is a possibility of
mdp5_pipe_release hitting a NULL dereference error.
To avoid this, let's have mdp5_pipe_release check if
mdp5_get_global_state returns an error and propogate that error.
Changes since v1:
- Separated declaration and initialization of *new_state to avoid
compiler warning
- Fixed some spelling mistakes in commit message
Changes since v2:
- Return 0 in case where hwpipe is NULL as this is considered normal
behavior
- Added 2nd patch in series to fix a similar NULL dereference issue in
mdp5_mixer_release
Reported-by: Tomeu Vizoso <[email protected]>
Signed-off-by: Jessica Zhang <[email protected]>
Fixes: 7907a0d77cb4 ("drm/msm/mdp5: Use the new private_obj state")
Reviewed-by: Rob Clark <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/485179/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions
