From: Jani Nikula <jani.nikula@linux.intel.com>
To: Haoxiang Li <haoxiang_li2024@163.com>,
rodrigo.vivi@intel.com, joonas.lahtinen@linux.intel.com,
tursulin@ursulin.net, airlied@gmail.com, simona@ffwll.ch,
gustavo.sousa@intel.com
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Haoxiang Li <haoxiang_li2024@163.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue()
Date: Wed, 19 Feb 2025 17:26:28 +0200 [thread overview]
Message-ID: <87wmdmlzvf.fsf@intel.com> (raw)
In-Reply-To: <20250219130800.2638016-1-haoxiang_li2024@163.com>
On Wed, 19 Feb 2025, Haoxiang Li <haoxiang_li2024@163.com> wrote:
> Add check for the return value of alloc_ordered_workqueue()
> and alloc_workqueue() to catch potential exception.
>
> Fixes: 40053823baad ("drm/i915/display: move modeset probe/remove functions to intel_display_driver.c")
Not really. That's just code movement.
> Cc: stable@vger.kernel.org
> Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_driver.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 50ec0c3c7588..dfe5b779aefd 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -245,6 +245,11 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
> WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE);
> display->wq.cleanup = alloc_workqueue("i915_cleanup", WQ_HIGHPRI, 0);
>
> + if (!display->wq.modeset || !display->wq.flip || !display->wq.cleanup) {
> + ret = -ENOMEM;
> + goto cleanup_vga_client_pw_domain_dmc;
> + }
> +
Yes, we should check these, but if some of them succeed and some fail,
we'll never destroy the workqueues whose allocation succeeded.
BR,
Jani.
> intel_mode_config_init(display);
>
> ret = intel_cdclk_init(display);
--
Jani Nikula, Intel
prev parent reply other threads:[~2025-02-19 15:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 13:08 [PATCH] drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue() Haoxiang Li
2025-02-19 15:26 ` Jani Nikula [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=87wmdmlzvf.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.sousa@intel.com \
--cc=haoxiang_li2024@163.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=tursulin@ursulin.net \
/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.