mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()
[ Upstream commita35faec3db
] The > ARRAY_SIZE() should be >= ARRAY_SIZE() to prevent an out of bounds access. Fixes:e27c41d5b0
("drm/amd/display: Support for DMUB HPD interrupt handling") Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
119b7d5480
commit
607c5cd1a0
1 changed files with 1 additions and 1 deletions
|
@ -771,7 +771,7 @@ static void dm_dmub_outbox1_low_irq(void *interrupt_params)
|
|||
|
||||
do {
|
||||
dc_stat_get_dmub_notification(adev->dm.dc, ¬ify);
|
||||
if (notify.type > ARRAY_SIZE(dm->dmub_thread_offload)) {
|
||||
if (notify.type >= ARRAY_SIZE(dm->dmub_thread_offload)) {
|
||||
DRM_ERROR("DM: notify type %d invalid!", notify.type);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue