Loading
drm/msm/mdp5: Return error code in mdp5_mixer_release when deadlock is detected
stable inclusion from stable-v4.19.247 commit 1a5d1474026ea4f1a6f931075ca2adb884af39cf category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP48W CVE: CVE-2022-49488 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1a5d1474026ea4f1a6f931075ca2adb884af39cf -------------------------------- [ Upstream commit ca75f6f7 ] There is a possibility for mdp5_get_global_state to return -EDEADLK when acquiring the modeset lock, but currently global_state in mdp5_mixer_release doesn't check for if an error is returned. To avoid a NULL dereference error, let's have mdp5_mixer_release check if an error is returned and propagate that error. Reported-by:Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by:
Jessica Zhang <quic_jesszhan@quicinc.com> Fixes: 7907a0d7 ("drm/msm/mdp5: Use the new private_obj state") Reviewed-by:
Rob Clark <robdclark@gmail.com> Reviewed-by:
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/485181/ Link: https://lore.kernel.org/r/20220505214051.155-2-quic_jesszhan@quicinc.com Signed-off-by:
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Liu Shixin <liushixin2@huawei.com>