[Intel-xe] Revert "drm/i915/display: Fix a use-after-free when intel_edp_init_connector fails"

Hogander, Jouni jouni.hogander at intel.com
Wed Oct 4 11:27:05 UTC 2023


On Mon, 2023-10-02 at 13:40 +0300, Jani Nikula wrote:
> This reverts commit 299ddb10031a33cd51e375565ea22b3e829f5949.
> 
> This is fixed by commit f917130f19fe ("drm/i915: Flush power delayed
> put
> when connector init failed") upstream, and already part of the
> baseline.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Reviewed-by: Jouni Högander <jouni.hogander at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_power.c | 2 +-
>  drivers/gpu/drm/i915/display/intel_display_power.h | 1 -
>  drivers/gpu/drm/i915/display/intel_dp_aux.c        | 2 --
>  3 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c
> b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 08f63340ff58..e25785ae1c20 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -812,7 +812,7 @@ void intel_display_power_flush_work(struct
> drm_i915_private *i915)
>   * Like intel_display_power_flush_work(), but also ensure that the
> work
>   * handler function is not running any more when this function
> returns.
>   */
> -void
> +static void
>  intel_display_power_flush_work_sync(struct drm_i915_private *i915)
>  {
>         struct i915_power_domains *power_domains = &i915-
> >display.power.domains;
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h
> b/drivers/gpu/drm/i915/display/intel_display_power.h
> index ec2b5560877f..d6c2a5846bdc 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.h
> @@ -200,7 +200,6 @@ void __intel_display_power_put_async(struct
> drm_i915_private *i915,
>                                      intel_wakeref_t wakeref,
>                                      int delay_ms);
>  void intel_display_power_flush_work(struct drm_i915_private *i915);
> -void intel_display_power_flush_work_sync(struct drm_i915_private
> *i915);
>  #if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
>  void intel_display_power_put(struct drm_i915_private *dev_priv,
>                              enum intel_display_power_domain domain,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c
> b/drivers/gpu/drm/i915/display/intel_dp_aux.c
> index 03f1e1425a0a..4431b6290c4c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c
> @@ -734,8 +734,6 @@ void intel_dp_aux_fini(struct intel_dp *intel_dp)
>         if (cpu_latency_qos_request_active(&intel_dp->pm_qos))
>                 cpu_latency_qos_remove_request(&intel_dp->pm_qos);
>  
> -       /* Ensure async work from intel_dp_aux_xfer() is flushed
> before we clean up */
> -       intel_display_power_flush_work_sync(dp_to_i915(intel_dp));
>         kfree(intel_dp->aux.name);
>  }
>  



More information about the Intel-xe mailing list