Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d35cf41c authored by Jesse Zhang's avatar Jesse Zhang Committed by Greg Kroah-Hartman
Browse files

drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc



commit 88a9a467c548d0b3c7761b4fd54a68e70f9c0944 upstream.

Initialize the size before calling amdgpu_vce_cs_reloc, such as case 0x03000001.
V2: To really improve the handling we would actually
   need to have a separate value of 0xffffffff.(Christian)

Signed-off-by: default avatarJesse Zhang <jesse.zhang@amd.com>
Suggested-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarVamsi Krishna Brahmajosyula <vamsi-krishna.brahmajosyula@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bef72d1a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -714,7 +714,8 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p, uint32_t ib_idx)
	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 idx;
	int i, r = 0;