From: "Adrián Larumbe" <adrian.larumbe@collabora.com>
To: Linmao Li <lilinmao@kylinos.cn>
Cc: Boris Brezillon <boris.brezillon@collabora.com>,
Steven Price <steven.price@arm.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: Check debugfs GEM lock initialization
Date: Wed, 15 Jul 2026 13:40:01 +0100 [thread overview]
Message-ID: <ald_i92r4A1wc3MQ@sobremesa> (raw)
In-Reply-To: <20260713082912.321021-1-lilinmao@kylinos.cn>
Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>
On 13.07.2026 16:29, Linmao Li wrote:
> drmm_mutex_init() can fail while registering the managed cleanup action.
> When that happens, drmm_add_action_or_reset() destroys the mutex before
> returning the error. Continuing initialization would therefore leave the
> debugfs GEM object list with an unusable lock.
>
> Propagate the error as is already done for the other managed mutexes in
> panthor_device_init().
>
> Fixes: a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM objects over DebugFS")
> Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
> ---
> drivers/gpu/drm/panthor/panthor_device.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> index 0b25abebb803..9687c59de350 100644
> --- a/drivers/gpu/drm/panthor/panthor_device.c
> +++ b/drivers/gpu/drm/panthor/panthor_device.c
> @@ -182,7 +182,10 @@ int panthor_device_init(struct panthor_device *ptdev)
> return ret;
>
> #ifdef CONFIG_DEBUG_FS
> - drmm_mutex_init(&ptdev->base, &ptdev->gems.lock);
> + ret = drmm_mutex_init(&ptdev->base, &ptdev->gems.lock);
> + if (ret)
> + return ret;
> +
> INIT_LIST_HEAD(&ptdev->gems.node);
> #endif
>
> --
> 2.25.1
>
Adrian Larumbe
prev parent reply other threads:[~2026-07-15 12:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 8:29 Linmao Li
2026-07-15 12:15 ` Liviu Dudau
2026-07-15 12:40 ` Adrián Larumbe [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=ald_i92r4A1wc3MQ@sobremesa \
--to=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=lilinmao@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--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
Powered by JetHome