drm/amdgpu: validate the parameters of bo mapping operations more clearly
authorxinhui pan <xinhui.pan@amd.com>
Thu, 11 Apr 2024 03:11:38 +0000 (11:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Apr 2024 15:05:28 +0000 (17:05 +0200)
commit8b12fc7b032633539acdf7864888b0ebd49e90f2
tree5462e82f67d292e8c443300d8690567d7ce9efc6
parenta2fd6dbc98be1105a1d8e9e31575da8873ef115c
drm/amdgpu: validate the parameters of bo mapping operations more clearly

commit 6fef2d4c00b5b8561ad68dd2b68173f5c6af1e75 upstream.

Verify the parameters of
amdgpu_vm_bo_(map/replace_map/clearing_mappings) in one common place.

Fixes: dc54d3d1744d ("drm/amdgpu: implement AMDGPU_VA_OP_CLEAR v2")
Cc: stable@vger.kernel.org
Reported-by: Vlad Stolyarov <hexed@google.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@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_vm.c