]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Check if fd really is an amdgpu fd.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 30 Jan 2019 01:53:21 +0000 (02:53 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Feb 2019 16:15:37 +0000 (11:15 -0500)
commit35668eef13325227ceda9f2d44f633b2254b678f
tree5fe70a4455cea94a2b5b2385bb04cfc523a864d9
parent24e107bb4095f8a37ff714cb9c19102989134692
drm/amdgpu: Check if fd really is an amdgpu fd.

Otherwise we interpret the file private data as drm & amdgpu data
while it might not be, possibly allowing one to get memory corruption.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c