From 4ca0067f0867d2ca1e8f8009ec937f2bcfd4ad5d Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 21 Nov 2023 02:22:04 +0000 Subject: [PATCH] drm/radeon: possible buffer overflow From Konstantin Meskhidze 341e79f8aec6af6b0061b8171d77b085835c6a58 in linux-6.1.y/6.1.63 dd05484f99d16715a88eedfca363828ef9a4c2d4 in mainline linux --- sys/dev/pci/drm/radeon/evergreen.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/drm/radeon/evergreen.c b/sys/dev/pci/drm/radeon/evergreen.c index 42507f7c2a2..7e6befdad21 100644 --- a/sys/dev/pci/drm/radeon/evergreen.c +++ b/sys/dev/pci/drm/radeon/evergreen.c @@ -4823,14 +4823,15 @@ restart_ih: break; case 44: /* hdmi */ afmt_idx = src_data; - if (!(afmt_status[afmt_idx] & AFMT_AZ_FORMAT_WTRIG)) - DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); - if (afmt_idx > 5) { DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data); break; } + + if (!(afmt_status[afmt_idx] & AFMT_AZ_FORMAT_WTRIG)) + DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); + afmt_status[afmt_idx] &= ~AFMT_AZ_FORMAT_WTRIG; queue_hdmi = true; DRM_DEBUG("IH: HDMI%d\n", afmt_idx + 1); -- 2.20.1