drm/amdgpu: Use unsigned ring indices in amdgpu_queue_mgr_map
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 22 Nov 2017 14:55:21 +0000 (15:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Dec 2017 12:40:37 +0000 (13:40 +0100)
commit955c907b978589fbd34e9eaaf53527d8cbf589b4
treeb1fa606b46ced0c31a42d76b2995df40e3bc228b
parentbacbe44889828852678bc74ad0e942a7684f206f
drm/amdgpu: Use unsigned ring indices in amdgpu_queue_mgr_map

commit fa7c7939b4bf112cd06ba166b739244077898990 upstream.

This matches the corresponding UAPI fields. Treating the ring index as
signed could result in accessing random unrelated memory if the MSB was
set.

Fixes: effd924d2f3b ("drm/amdgpu: untie user ring ids from kernel ring ids v6")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c