mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-17 18:20:28 -05:00
drm/panthor: validate group queue count
A panthor group can have at most MAX_CS_PER_CSG panthor queues.
Fixes: 4bdca11507 ("drm/panthor: Add the driver frontend block")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> # v1
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250903192133.288477-1-olvaffe@gmail.com
This commit is contained in:
@@ -1094,7 +1094,7 @@ static int panthor_ioctl_group_create(struct drm_device *ddev, void *data,
|
||||
struct drm_panthor_queue_create *queue_args;
|
||||
int ret;
|
||||
|
||||
if (!args->queues.count)
|
||||
if (!args->queues.count || args->queues.count > MAX_CS_PER_CSG)
|
||||
return -EINVAL;
|
||||
|
||||
ret = PANTHOR_UOBJ_GET_ARRAY(queue_args, &args->queues);
|
||||
|
||||
Reference in New Issue
Block a user