Skip to content

Commit a00f201

Browse files
olvaffeSteven Price
authored andcommitted
drm/panthor: validate group queue count
A panthor group can have at most MAX_CS_PER_CSG panthor queues. Fixes: 4bdca11 ("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
1 parent d506703 commit a00f201

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/panthor/panthor_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ static int panthor_ioctl_group_create(struct drm_device *ddev, void *data,
10941094
struct drm_panthor_queue_create *queue_args;
10951095
int ret;
10961096

1097-
if (!args->queues.count)
1097+
if (!args->queues.count || args->queues.count > MAX_CS_PER_CSG)
10981098
return -EINVAL;
10991099

11001100
ret = PANTHOR_UOBJ_GET_ARRAY(queue_args, &args->queues);

0 commit comments

Comments
 (0)