From: jsg Date: Mon, 9 Sep 2024 08:27:57 +0000 (+0000) Subject: drm/amdgpu: fix overflowed array index read warning X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fbc99a0f0c89106a77beac0024fbda017e43855a;p=openbsd drm/amdgpu: fix overflowed array index read warning From Tim Huang da22d1b98d9d3a1bfd62bd291b10d57b0f19d6e5 in linux-6.6.y/6.6.50 ebbc2ada5c636a6a63d8316a3408753768f5aa9f in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c index dbde3b41c08..0bedffc4eb4 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c @@ -469,8 +469,9 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf, size_t size, loff_t *pos) { struct amdgpu_ring *ring = file_inode(f)->i_private; - int r, i; uint32_t value, result, early[3]; + loff_t i; + int r; if (*pos & 3 || size & 3) return -EINVAL;