From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Ma Jun <Jun.Ma2@amd.com>,
amd-gfx@lists.freedesktop.org, christian.koenig@amd.com,
Alexander.Deucher@amd.com
Subject: Re: [PATCH v2] drm/amdgpu: Fix out-of-bounds write warning
Date: Tue, 7 May 2024 15:27:12 +0200 [thread overview]
Message-ID: <a6f3ce54-e6e2-41d2-b5b0-4b5c26659cc1@gmail.com> (raw)
In-Reply-To: <20240506055901.227249-1-Jun.Ma2@amd.com>
Am 06.05.24 um 07:59 schrieb Ma Jun:
> Check the ring type value to fix the out-of-bounds
> write warning
>
> Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
> Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> index 15c240656470..ad49cecb20b8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> @@ -352,7 +352,7 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
> ring->max_dw = max_dw;
> ring->hw_prio = hw_prio;
>
> - if (!ring->no_scheduler) {
> + if (!ring->no_scheduler && ring->funcs->type < AMDGPU_HW_IP_NUM) {
> hw_ip = ring->funcs->type;
> num_sched = &adev->gpu_sched[hw_ip][hw_prio].num_scheds;
> adev->gpu_sched[hw_ip][hw_prio].sched[(*num_sched)++] =
prev parent reply other threads:[~2024-05-07 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 5:59 [PATCH v2] drm/amdgpu: Fix out-of-bounds write warning Ma Jun
2024-05-06 9:20 ` Huang, Tim
2024-05-07 13:27 ` Christian König [this message]
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=a6f3ce54-e6e2-41d2-b5b0-4b5c26659cc1@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Alexander.Deucher@amd.com \
--cc=Jun.Ma2@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).