From: jsg Date: Mon, 1 Aug 2022 16:17:17 +0000 (+0000) Subject: drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e0a36bba31fb810c1c3dd9719ead4d98f07090a4;p=openbsd drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq() From Dan Carpenter ec9ec3bc08b18c5b1b2feafd306ea7c348013898 in linux 5.15.y/5.15.58 a35faec3db0e13aac8ea720bc1a3503081dd5a3d in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index a7ec346afc2..a2d8e03c8b8 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -757,7 +757,7 @@ static void dm_dmub_outbox1_low_irq(void *interrupt_params) if (irq_params->irq_src == DC_IRQ_SOURCE_DMCUB_OUTBOX) { 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 larger than the array size %ld !", notify.type, ARRAY_SIZE(dm->dmub_thread_offload)); continue;