summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-07-12 03:50:24 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-07-12 03:50:24 +0000
commitba882ae732de66537906c018072055c64d9acc7e (patch)
tree589de62a2c76c8cea93b34ed400acade5274c7d8 /sys/dev
parent3a19f6284fcd7d2b8ebd39de2e541d5815a8bc53 (diff)
drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc
From Jesse Zhang 855ae72c20310e5402b2317fc537d911e87537ef in linux-6.6.y/6.6.39 88a9a467c548d0b3c7761b4fd54a68e70f9c0944 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_vce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vce.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vce.c
index 6a5128bc34c..d7ffec7b8e9 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vce.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vce.c
@@ -742,7 +742,8 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p,
uint32_t created = 0;
uint32_t allocated = 0;
uint32_t tmp, handle = 0;
- uint32_t *size = &tmp;
+ uint32_t dummy = 0xffffffff;
+ uint32_t *size = &dummy;
unsigned int idx;
int i, r = 0;