summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-11-15 01:15:32 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-11-15 01:15:32 +0000
commit24058763e10804ee6bb73219001380811674a9a6 (patch)
tree392e603b820e121119eed673b87897819fd0a7c7 /sys/dev/pci/drm
parentad61b1171ff1da474bd17b83f279b80d042ff419 (diff)
drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
From Alex Deucher 8906728f2fbd6504cb488f4afdd66af28f330a7a in linux-6.6.y/6.6.61 4d75b9468021c73108b4439794d69e892b1d24e3 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c
index 74687723a7c..527a3434bb1 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -402,7 +402,7 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz
int r;
uint32_t *data, x;
- if (size & 0x3 || *pos & 0x3)
+ if (size > 4096 || size & 0x3 || *pos & 0x3)
return -EINVAL;
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);