From: Alvin Lee alvin.lee2@amd.com
stable inclusion from stable-v6.1.109 commit d219f902b16d42f0cb8c499ea8f31cf3c0f36349 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARVIX CVE: CVE-2024-46732
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=...
--------------------------------
[ Upstream commit 984debc133efa05e62f5aa1a7a1dd8ca0ef041f4 ]
[Description] Assign linear_pitch_alignment so we don't cause a divide by 0 error in VM environments
Reviewed-by: Sohaib Nadeem sohaib.nadeem@amd.com Acked-by: Wayne Lin wayne.lin@amd.com Signed-off-by: Alvin Lee alvin.lee2@amd.com Tested-by: Daniel Wheeler daniel.wheeler@amd.com Signed-off-by: Alex Deucher alexander.deucher@amd.com Signed-off-by: Sasha Levin sashal@kernel.org Conflicts: drivers/gpu/drm/amd/display/dc/core/dc.c [Context conflicts with dc_create().] Signed-off-by: Gu Bowen gubowen5@huawei.com --- drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 050e46741c99..adcf5ba83703 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -938,6 +938,7 @@ struct dc *dc_create(const struct dc_init_data *init_params) goto alloc_fail;
if (init_params->dce_environment == DCE_ENV_VIRTUAL_HW) { + dc->caps.linear_pitch_alignment = 64; if (false == dc_construct_ctx(dc, init_params)) { dc_destruct(dc); goto construct_fail;