From: sashiko-bot@kernel.org
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 07/14] drm/msm/mdp5: unwind a failed mdp5_kms_init()
Date: Fri, 27 Nov 2026 19:53:18 +0000 [thread overview]
Message-ID: <sashiko-outbox-238185@kernel.org> (raw)
In-Reply-To: <20261127-msm-kms-destroy-fixes-v4-7-242b0a3f8e47@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/msm/mdp5: inaccurate Fixes trailer in mdp5_kms_init() unwind
commit
--
commit 9e7e45efa8a5a51745ca779b3100de8c25d89be0
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> drm/msm/mdp5: unwind a failed mdp5_kms_init()
>
> mdp5_kms_init() returns straight away when one of its later steps fails,
> leaving behind the kms, the runtime PM reference taken around the address
> space setup and the address space itself, and lets the ->destroy()
> callback, which the caller runs afterwards, clean up. When mdp5_init()
> fails, however, it has already run mdp5_destroy() itself, and ->destroy()
> runs it a second time: the global state object is finalised twice.
>
> Undo the steps which have completed, in the reverse order, drop the
> runtime PM reference on the error path as well, and tell the caller not
> to run ->destroy() after a failed init. Fold the hardware setup, which
> can't fail, into mdp5_kms_init().
>
> Fixes: 8d58ef346f30 ("drm/msm/mdp5: Add global state as a private atomic object")
> Assisted-by: LLM
> Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[Severity: Low]
Is the Fixes tag pointing at the right commit?
At 8d58ef346f30 ("drm/msm/mdp5: Add global state as a private atomic
object"), mdp5_init() was called from mdp5_bind() rather than
mdp5_kms_init(), mdp5_destroy() was called from mdp5_unbind() rather than
mdp5_kms_destroy(), and mdp5_kms_init() unwound on failure via its own
fail label instead of returning early.
Calling mdp5_init() from mdp5_kms_init() and mdp5_destroy() from
mdp5_kms_destroy() was introduced in 6874f48bb8b0 ("drm/msm: make mdp5/dpu
devices master components"), while returning early from mdp5_kms_init() to
rely on the caller's ->destroy() callback was introduced in 93c125e4ea98
("drm/msm: don't tear down KMS twice when KMS init fails").
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-msm-kms-destroy-fixes-v4-0-242b0a3f8e47@oss.qualcomm.com?part=7
next prev parent reply other threads:[~2026-11-27 19:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 19:44 [PATCH v4 00/14] drm/msm: fix the error handling of the KMS init Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 01/14] drm/msm: fail the snapshot init when its worker cannot be created Dmitry Baryshkov
2026-11-30 8:45 ` Konrad Dybcio
2026-11-27 19:44 ` [PATCH v4 02/14] drm/msm/mdp5: forget the hardware blocks of a previous bind Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 03/14] drm/msm: unwind msm_drm_kms_init() on failure Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 04/14] drm/msm: order the display snapshot sources around its worker Dmitry Baryshkov
2026-11-27 19:57 ` sashiko-bot
2026-11-30 8:46 ` Konrad Dybcio
2026-11-27 19:44 ` [PATCH v4 05/14] drm/msm: clean up after a failed msm_kms_init() Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 06/14] drm/msm: let the kms drivers clean up a failed kms_init() Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 07/14] drm/msm/mdp5: unwind a failed mdp5_kms_init() Dmitry Baryshkov
2026-11-27 19:53 ` sashiko-bot [this message]
2026-11-27 19:44 ` [PATCH v4 08/14] drm/msm/mdp4: unwind a failed mdp4_kms_init() Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 09/14] drm/msm/dpu: don't tear down a failed hw_init twice Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 10/14] drm/msm: tear down only a successfully initialised KMS Dmitry Baryshkov
2026-11-30 8:49 ` Konrad Dybcio
2026-11-27 19:44 ` [PATCH v4 11/14] drm/msm/dpu: clean up the self-refresh helpers on teardown Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 12/14] drm/msm/dpu: unwind a failed dpu_kms_hw_init() step by step Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 13/14] drm/msm/mdp4: disable the vdd regulator on teardown Dmitry Baryshkov
2026-11-27 19:44 ` [PATCH v4 14/14] drm/msm: drop the runtime PM flags from the KMS teardown Dmitry Baryshkov
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=sashiko-outbox-238185@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.