drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1
authorjsg <jsg@openbsd.org>
Thu, 24 Aug 2023 05:59:58 +0000 (05:59 +0000)
committerjsg <jsg@openbsd.org>
Thu, 24 Aug 2023 05:59:58 +0000 (05:59 +0000)
From hackyzh002
9f55d300541cb5b435984d269087810581580b00 in linux-6.1.y/6.1.47
87c2213e85bd81e4a9a4d0880c256568794ae388 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c

index b2b64a6..22f8a5a 100644 (file)
@@ -185,7 +185,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
        uint64_t *chunk_array_user;
        uint64_t *chunk_array;
        uint32_t uf_offset = 0;
-       unsigned int size;
+       size_t size;
        int ret;
        int i;