Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Kaushlendra Kumar <kaushlendra.kumar@intel.com>,
	rodrigo.vivi@intel.com, joonas.lahtinen@linux.intel.com,
	tursulin@ursulin.net, airlied@gmail.com, simona@ffwll.ch
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org,
	Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Subject: Re: [PATCH] drm/i915/crtc: Guard vblank wait when CRTC lookup fails
Date: Fri, 16 Jan 2026 11:50:46 +0200	[thread overview]
Message-ID: <6f7ad8bd5d41e50176d98cfb658aaa7b77f63cd0@intel.com> (raw)
In-Reply-To: <20260116062203.1650454-1-kaushlendra.kumar@intel.com>

On Fri, 16 Jan 2026, Kaushlendra Kumar <kaushlendra.kumar@intel.com> wrote:
> intel_crtc_for_pipe() may return NULL in teardown/error paths.
> Add a NULL check in intel_wait_for_vblank_if_active() to avoid
> dereferencing a missing CRTC and rare NULL deref panics.

Do you have the backtrace?

BR,
Jani.

>
> Fixes: 92e9624ad946 ("drm/i915/crtc: un-inline some crtc functions and move to intel_crtc.[ch]")
> Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_crtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
> index 9d2a23c96c61..9eb158737c1c 100644
> --- a/drivers/gpu/drm/i915/display/intel_crtc.c
> +++ b/drivers/gpu/drm/i915/display/intel_crtc.c
> @@ -74,7 +74,7 @@ void intel_wait_for_vblank_if_active(struct intel_display *display,
>  {
>  	struct intel_crtc *crtc = intel_crtc_for_pipe(display, pipe);
>  
> -	if (crtc->active)
> +	if (crtc && crtc->active)
>  		intel_crtc_wait_for_next_vblank(crtc);
>  }

-- 
Jani Nikula, Intel

      parent reply	other threads:[~2026-01-16  9:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16  6:22 [PATCH] drm/i915/crtc: Guard vblank wait when CRTC lookup fails Kaushlendra Kumar
2026-01-16  6:31 ` ✓ CI.KUnit: success for " Patchwork
2026-01-16  7:09 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-16  9:14 ` ✓ Xe.CI.Full: " Patchwork
2026-01-16  9:50 ` 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=6f7ad8bd5d41e50176d98cfb658aaa7b77f63cd0@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kaushlendra.kumar@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox