public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Ma Ke <make24@iscas.ac.cn>
Cc: jani.nikula@linux.intel.com, rodrigo.vivi@intel.com,
	joonas.lahtinen@linux.intel.com, tursulin@ursulin.net,
	airlied@gmail.com, daniel@ffwll.ch,
	ville.syrjala@linux.intel.com, stanislav.lisovskiy@intel.com,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915: Fix NULL ptr deref in intel_async_flip_check_uapi()
Date: Wed, 7 Aug 2024 22:21:48 +0100	[thread overview]
Message-ID: <ZrPlbBGFAGLVfGf3@ashyti-mobl2.lan> (raw)
In-Reply-To: <20240806092249.2407555-1-make24@iscas.ac.cn>

Hi Ma,

> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index c2c388212e2e..9dd7b5985d57 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -6115,7 +6115,7 @@ static int intel_async_flip_check_uapi(struct intel_atomic_state *state,
>  		return -EINVAL;
>  	}
>  
> -	if (intel_crtc_needs_modeset(new_crtc_state)) {
> +	if (new_crtc_state && intel_crtc_needs_modeset(new_crtc_state)) {

new_crtc_state is used also earlier. If it was NULL you wouldn't
have reached this state.

Have you experienced a null pointer dereference or is it some
code analyzer that reported this? Can you explain how
intel_atomic_get_new_crtc_state() can return NULL?

For now this is nacked.

Thanks,
Andi

  reply	other threads:[~2024-08-07 21:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06  9:22 [PATCH] drm/i915: Fix NULL ptr deref in intel_async_flip_check_uapi() Ma Ke
2024-08-07 21:21 ` Andi Shyti [this message]
2024-08-12 16:28 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-08-13  5:46 ` ✗ Fi.CI.IGT: failure " Patchwork

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=ZrPlbBGFAGLVfGf3@ashyti-mobl2.lan \
    --to=andi.shyti@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=make24@iscas.ac.cn \
    --cc=rodrigo.vivi@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=stanislav.lisovskiy@intel.com \
    --cc=tursulin@ursulin.net \
    --cc=ville.syrjala@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox