]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdkfd: Check bounds on CRIU restore queue type and mqd size
authorDavid Francis <David.Francis@amd.com>
Mon, 6 Jul 2026 14:19:04 +0000 (10:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2026 20:46:53 +0000 (16:46 -0400)
commit47ea05f246bebc81c7796f56265cffd812cf0601
treef7fd90a49007f23e4b35a4eb2dfec50b8765a78f
parente987eabc02646920cd13ab75902693e99735eca0
drm/amdkfd: Check bounds on CRIU restore queue type and mqd size

We weren't checking whether the values provided in the private
data in kfd CRIU restore were within bounds.

For queue type, add a KFD_QUEUE_TYPE_MAX and ensure the provided
type is less than it.

For mqd_size, add new function mqd_size_from_queue_type and confirm
that the provided mqd_size matches expectations.

Reviewed-by: David Yat Sin <david.yatsin@amd.com>
Signed-off-by: David Francis <David.Francis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f19d8086f6644083c913d70bfdeee20e1b6f46a5)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c