]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdkfd: Check bounds on allocate_doorbell
authorDavid Francis <David.Francis@amd.com>
Tue, 12 May 2026 19:15:33 +0000 (15:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 16:11:26 +0000 (12:11 -0400)
commita1d4b228e3dc5134c4bd06e55e81dbb604c8cadb
tree1cf6ea291362071d75f5854abcaa6a58a490ad82
parent0c61a9732a35b0a96213119c8212349da9cda117
drm/amdkfd: Check bounds on allocate_doorbell

allocated_doorbell has an option to set the doorbell id
to a specific value (used by CRIU). This value was not
bounds checked.

Check to confirm it's less than KFD_MAX_NUM_OF_QUEUES_PER_PROCESS.

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>
(cherry picked from commit 1f087bb8cf9e8797633da35c85435e557ef74d06)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c