kernel_samsung_a53x/drivers/gpu/drm/amd/display/modules
Alex Hung eb5556c208 drm/amd/display: Check index msg_id before read or write
[ Upstream commit 59d99deb330af206a4541db0c4da8f73880fba03 ]

[WHAT]
msg_id is used as an array index and it cannot be a negative value, and
therefore cannot be equal to MOD_HDCP_MESSAGE_ID_INVALID (-1).

[HOW]
Check whether msg_id is valid before reading and setting.

This fixes 4 OVERRUN issues reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:40 +01:00
..
color Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
freesync Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hdcp drm/amd/display: Check index msg_id before read or write 2024-11-19 14:19:40 +01:00
inc drm/amd/display: revert Exit idle optimizations before HDCP execution 2024-11-19 14:19:10 +01:00
info_packet Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmid Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00