diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-09-09 09:16:03 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-09-09 09:16:03 +0000 |
commit | 5e497fda67faad4b6d43011364e2c941a82c9d7f (patch) | |
tree | 21db4c879da4af9da4e63b161cf109df04864d68 /sys/dev | |
parent | 5d219aa2f110515a6a6faa6294103e4ddd017802 (diff) |
drm/amdgpu: Fix out-of-bounds write warning
From Ma Jun
a60d1f7ff62e453dde2d3b4907e178954d199844 in linux-6.6.y/6.6.50
be1684930f5262a622d40ce7a6f1423530d87f89 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c index 0bedffc4eb4..f44b303ae28 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c +++ b/sys/dev/pci/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)++] = |