drm/amdkfd: Check bounds for allocate_sdma_queue restore_sdma_id
authorDavid Francis <David.Francis@amd.com>
Tue, 12 May 2026 19:18:18 +0000 (15:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 May 2026 22:19:32 +0000 (18:19 -0400)
commitbfe9a7545b2a7be1c543f1741e16f2d5ec4116ae
treec0e209452da11f3ec0bf19bb79411d053d490190
parent4d50a14d346141e03a7c3905e496d91e048bc30c
drm/amdkfd: Check bounds for allocate_sdma_queue restore_sdma_id

allocate_sdma_queue has an option where the sdma queue id can be
specified (used by CRIU). We weren't bounds-checking that
value.

Confirm it's less than the maximum number of queues.

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c