Commit a00f2015 authored by Chia-I Wu's avatar Chia-I Wu Committed by Steven Price
Browse files

drm/panthor: validate group queue count



A panthor group can have at most MAX_CS_PER_CSG panthor queues.

Fixes: 4bdca115 ("drm/panthor: Add the driver frontend block")
Signed-off-by: default avatarChia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> # v1
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Signed-off-by: default avatarSteven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250903192133.288477-1-olvaffe@gmail.com
parent d5067034
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);