From: "Christian König" <christian.koenig@amd.com>
To: Bob Zhou <bob.zhou@amd.com>,
amd-gfx@lists.freedesktop.org, le.ma@amd.com
Cc: Alexander.Deucher@amd.com
Subject: Re: [PATCH] drm/amdgpu: add error handle to avoid out-of-bounds
Date: Tue, 23 Apr 2024 13:36:23 +0200 [thread overview]
Message-ID: <48ce932a-cec6-4b62-aaa0-a4ecde39210a@amd.com> (raw)
In-Reply-To: <20240423091503.12691-1-bob.zhou@amd.com>
Am 23.04.24 um 11:15 schrieb Bob Zhou:
> if the sdma_v4_0_irq_id_to_seq return -EINVAL, the process should
> be stop to avoid out-of-bounds read, so directly return -EINVAL.
>
> Signed-off-by: Bob Zhou <bob.zhou@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> index e2e3856938ed..101038395c3b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> @@ -2021,6 +2021,9 @@ static int sdma_v4_0_process_trap_irq(struct amdgpu_device *adev,
>
> DRM_DEBUG("IH: SDMA trap\n");
> instance = sdma_v4_0_irq_id_to_seq(entry->client_id);
> + if (instance < 0)
> + return instance;
> +
> switch (entry->ring_id) {
> case 0:
> amdgpu_fence_process(&adev->sdma.instance[instance].ring);
next prev parent reply other threads:[~2024-04-23 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 9:15 [PATCH] drm/amdgpu: add error handle to avoid out-of-bounds Bob Zhou
2024-04-23 11:36 ` Christian König [this message]
2024-04-24 7:58 ` Ma, Le
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48ce932a-cec6-4b62-aaa0-a4ecde39210a@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bob.zhou@amd.com \
--cc=le.ma@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.