[PATCH] drm/i915: Fix NULL ptr deref in intel_async_flip_check_uapi()
Andi Shyti
andi.shyti at linux.intel.com
Wed Aug 7 21:21:48 UTC 2024
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
More information about the dri-devel
mailing list