]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: check alignment on CPU page for bo map
authorXℹ Ruoyao <xry111@mengyan1223.wang>
Tue, 30 Mar 2021 15:33:34 +0000 (23:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:50:00 +0000 (16:50 -0400)
commite00591c5aca24bc55179054bc2c0827b93adbd79
tree12ac97808cc47f388d90992c067e5eeb4c216fa3
parent1186f4dcf855a231c5bf0b3fed6a9a3f9131a7d3
drm/amdgpu: check alignment on CPU page for bo map

The page table of AMDGPU requires an alignment to CPU page so we should
check ioctl parameters for it.  Return -EINVAL if some parameter is
unaligned to CPU page, instead of corrupt the page table sliently.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Xi Ruoyao <xry111@mengyan1223.wang>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c