From: sashiko-bot@kernel.org
To: yaolu@kylinos.cn
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
Date: Tue, 30 Jun 2026 03:22:53 +0000 [thread overview]
Message-ID: <20260630032254.05B511F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630031652.67747-1-yaolu@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Moving `intel_dmc_init()` before workqueue allocations causes a deterministic NULL pointer dereference in `queue_work()` during device probe.
--
commit ae307def86c4a6f405ddfe4fec9bd326757af84d
Author: Lu Yao <yaolu@kylinos.cn>
Subject: drm/i915/display: fix error handling in intel_display_driver_probe_noirq
This commit modifies the error handling path during display driver probe by
moving the intel_dmc_init call earlier and introducing a cleanup label for
intel_mode_config_init.
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index d0729936f6816..d69bdfb19efe5 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -223,6 +223,8 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
> if (!HAS_DISPLAY(display))
> return 0;
>
> + intel_dmc_init(display);
> +
[Severity: High]
Does this cause a NULL pointer dereference during device probe?
Looking at intel_dmc_init() in intel_dmc.c, it attempts to queue work on the
unordered workqueue:
void intel_dmc_init(struct intel_display *display)
{
...
queue_work(display->wq.unordered, &dmc->work);
...
}
However, display->wq.unordered is allocated further down in this function,
so it appears it will be NULL when intel_dmc_init() is called here.
> display->hotplug.dp_wq = alloc_ordered_workqueue("intel-dp", 0);
> if (!display->hotplug.dp_wq) {
> ret = -ENOMEM;
[ ... ]
> @@ -254,33 +256,31 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
> goto cleanup_wq_cleanup;
> }
>
> - intel_dmc_init(display);
> -
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260630031652.67747-1-yaolu@kylinos.cn?part=1
next prev parent reply other threads:[~2026-06-30 3:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 3:16 [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq yaolu
2026-06-30 3:22 ` sashiko-bot [this message]
2026-06-30 10:12 ` Jani Nikula
2026-07-01 1:15 ` [PATCH v2] " yaolu
2026-07-02 1:12 ` [PATCH v3] " yaolu
2026-08-04 13:50 ` [PATCH] " kernel test robot
2026-08-04 15:14 ` kernel test robot
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=20260630032254.05B511F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yaolu@kylinos.cn \
/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