From: sashiko-bot@kernel.org
To: "Yuanjie Yang" <yuanjie.yang@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/9] drm/msm/dp: don't depopulate the eDP AUX bus on component unbind
Date: Mon, 30 Nov 2026 07:09:11 +0000 [thread overview]
Message-ID: <sashiko-outbox-240554@kernel.org> (raw)
In-Reply-To: <20261130-dpu_unbind_rebind_display-v1-2-c335387de1bb@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/msm/dp: use-after-free of dp->aux after
msm_dp_display_remove()
--
commit ffc44dc305e10f09be11226df97e5b2a91916044
Author: Yuanjie Yang <yuanjie.yang@oss.qualcomm.com>
drm/msm/dp: don't depopulate the eDP AUX bus on component unbind
This commit stops calling of_dp_aux_depopulate_bus() in
msm_dp_display_unbind() so that eDP AUX bus teardown is left to the devm
action registered at probe time.
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
> index c0c150e2c5758..895174e047312 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -239,8 +239,6 @@ static void msm_dp_display_unbind(struct device *dev, struct device *master,
> struct msm_dp_display_private *dp = dev_get_dp_display_private(dev);
> struct msm_drm_private *priv = dev_get_drvdata(master);
>
> - of_dp_aux_depopulate_bus(dp->aux);
> -
> msm_dp_aux_unregister(dp->aux);
> dp->drm_dev = NULL;
> dp->aux->drm_dev = NULL;
[Severity: High]
Does deferring AUX bus depopulation to the devm action cause a
use-after-free of dp->aux during msm_dp_display_remove()?
When the platform device is removed, msm_dp_display_remove() runs before
devres_release_all():
drivers/gpu/drm/msm/dp/dp_display.c:msm_dp_display_remove() {
struct msm_dp_display_private *dp = dev_get_dp_display_private(&pdev->dev);
component_del(&pdev->dev, &msm_dp_display_comp_ops);
msm_dp_display_deinit_sub_modules(dp);
platform_set_drvdata(pdev, NULL);
}
msm_dp_display_deinit_sub_modules() calls msm_dp_aux_put(dp->aux), which
destroys aux->mutex and calls devm_kfree(aux->dev, aux). When
devres_release_all() then runs the devm_of_dp_aux_populate_bus() cleanup
action, of_dp_aux_depopulate_bus_void(dp->aux) dereferences aux->dev from
the already-freed dp->aux and tears down the child AUX endpoint device
after dp->aux and aux->mutex have been destroyed.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130-dpu_unbind_rebind_display-v1-0-c335387de1bb@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-11-30 7:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 6:55 [PATCH 0/9] drm/msm: fix unbind/rebind of the msm_dpu Yuanjie Yang
2026-11-30 6:55 ` [PATCH 1/9] drm/msm/dpu: clean up the self-refresh helper on KMS teardown Yuanjie Yang
2026-11-30 6:55 ` [PATCH 2/9] drm/msm/dp: don't depopulate the eDP AUX bus on component unbind Yuanjie Yang
2026-11-30 7:09 ` sashiko-bot [this message]
2026-11-30 9:54 ` yuanjiey
2026-11-30 6:55 ` [PATCH 3/9] drm/msm: unpin the fbdev buffer when the fbdev is destroyed Yuanjie Yang
2026-11-30 6:55 ` [PATCH 4/9] drm/msm/a6xx: don't leak the SQE vmap in a6xx_ucode_check_version() Yuanjie Yang
2026-11-30 8:00 ` Konrad Dybcio
2026-11-30 6:55 ` [PATCH 5/9] drm/msm/a6xx: drop the shadow BO vmap on destroy Yuanjie Yang
2026-11-30 8:04 ` Konrad Dybcio
2026-11-30 6:55 ` [PATCH 6/9] drm/msm/a6xx: free the preemption and pwrup_reglist buffers " Yuanjie Yang
2026-11-30 7:06 ` sashiko-bot
2026-11-30 6:55 ` [PATCH 7/9] drm/msm/a6xx: map the GMU rscc and PDC regions against the GPU device Yuanjie Yang
2026-11-30 7:07 ` sashiko-bot
2026-11-30 8:29 ` Konrad Dybcio
2026-11-30 9:56 ` yuanjiey
2026-11-30 6:55 ` [PATCH 8/9] drm/msm/a6xx: cold boot the GMU on the first resume after bind Yuanjie Yang
2026-11-30 6:55 ` [PATCH 9/9] drm/msm/a6xx: wake up a PDC left asleep by a previous GPU instance Yuanjie Yang
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-240554@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yuanjie.yang@oss.qualcomm.com \
/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.