* [PATCH v2] drm/panthor: validate group queue count
@ 2025-09-03 19:21 Chia-I Wu
2025-09-04 15:16 ` Steven Price
0 siblings, 1 reply; 2+ messages in thread
From: Chia-I Wu @ 2025-09-03 19:21 UTC (permalink / raw)
To: Boris Brezillon, Steven Price, Liviu Dudau, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Grant Likely, Heiko Stuebner, dri-devel, linux-kernel
A panthor group can have at most MAX_CS_PER_CSG panthor queues.
Fixes: 4bdca11507928 ("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>
---
v2:
- move validation up to panthor_ioctl_group_create
- add Fixes tag
---
drivers/gpu/drm/panthor/panthor_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c
index 9256806eb6623..4c202fc5ce050 100644
--- a/drivers/gpu/drm/panthor/panthor_drv.c
+++ b/drivers/gpu/drm/panthor/panthor_drv.c
@@ -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);
--
2.51.0.338.gd7d06c2dae-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] drm/panthor: validate group queue count
2025-09-03 19:21 [PATCH v2] drm/panthor: validate group queue count Chia-I Wu
@ 2025-09-04 15:16 ` Steven Price
0 siblings, 0 replies; 2+ messages in thread
From: Steven Price @ 2025-09-04 15:16 UTC (permalink / raw)
To: Chia-I Wu, Boris Brezillon, Liviu Dudau, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Grant Likely, Heiko Stuebner, dri-devel, linux-kernel
On 03/09/2025 20:21, Chia-I Wu wrote:
> A panthor group can have at most MAX_CS_PER_CSG panthor queues.
>
> Fixes: 4bdca11507928 ("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>
Pushed to drm-misc-fixes.
Thanks,
Steve
>
> ---
> v2:
> - move validation up to panthor_ioctl_group_create
> - add Fixes tag
> ---
> drivers/gpu/drm/panthor/panthor_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c
> index 9256806eb6623..4c202fc5ce050 100644
> --- a/drivers/gpu/drm/panthor/panthor_drv.c
> +++ b/drivers/gpu/drm/panthor/panthor_drv.c
> @@ -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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-04 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03 19:21 [PATCH v2] drm/panthor: validate group queue count Chia-I Wu
2025-09-04 15:16 ` Steven Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).