mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
drm/panthor: validate group queue count
[ Upstream commita00f2015ac] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e7639cf1e6
commit
a506ffe193
@@ -1023,7 +1023,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