From: Steven Price <steven.price@arm.com>
To: Chia-I Wu <olvaffe@gmail.com>,
Boris Brezillon <boris.brezillon@collabora.com>,
Liviu Dudau <liviu.dudau@arm.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/panthor: validate group queue count
Date: Wed, 3 Sep 2025 12:37:36 +0100 [thread overview]
Message-ID: <988cd2c6-27c7-4f7a-a234-ce0dfd2ea773@arm.com> (raw)
In-Reply-To: <20250902192001.409738-1-olvaffe@gmail.com>
On 02/09/2025 20:20, Chia-I Wu wrote:
> A panthor group can have at most MAX_CS_PER_CSG panthor queues.
>
> Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Good catch - that's a nasty bug.
I think this should have:
Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
> ---
> drivers/gpu/drm/panthor/panthor_sched.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index ba5dc3e443d9c..249ab889ca91f 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -3473,6 +3473,9 @@ int panthor_group_create(struct panthor_file *pfile,
> hweight64(group_args->tiler_core_mask) < group_args->max_tiler_cores)
> return -EINVAL;
>
> + if (group_args->queues.count > MAX_CS_PER_CSG)
> + return -EINVAL;
> +
I think this check would be better moved up to
panthor_ioctl_group_create() (where we already have a zero check). But
either way:
Reviewed-by: Steven Price <steven.price@arm.com>
Thanks,
Steve
> group = kzalloc(sizeof(*group), GFP_KERNEL);
> if (!group)
> return -ENOMEM;
prev parent reply other threads:[~2025-09-03 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 19:20 Chia-I Wu
2025-09-03 7:38 ` Boris Brezillon
2025-09-03 11:37 ` Steven Price [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=988cd2c6-27c7-4f7a-a234-ce0dfd2ea773@arm.com \
--to=steven.price@arm.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=olvaffe@gmail.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®