On Thu, 22 Dec 2022, Imre Deak <[email protected]> wrote:
> On Thu, Dec 22, 2022 at 09:18:04PM +0100, Maarten Lankhorst wrote:
>> When intel_dp_init_connector fails, some power wells used in dp aux
>> communication may not be completely disabled yet. This may result in a
>> null pointer dereference when icl_aux_pw_to_phy() is called from
>> icl_combo_phy_aux_power_well_disable() after the encoder and connector
>> are already freed.
>> 
>> Signed-off-by: Maarten Lankhorst <[email protected]>
>> Cc: Imre Deak <[email protected]>
>> Cc: Jani Nikula <[email protected]>
>> ---
>> This approach better?
>
> Looks ok to me, thanks for fixing it. I think Jani's idea is good to
> refactor things wrt. the encoder hooks, but imo that could be done later
> keeping the fix simpler, so:
>
> Acked-by: Imre Deak <[email protected]>

I missed this one. Pushed to din now, thanks for the patch and ack.

BR,
Jani.


>
>> 
>>  drivers/gpu/drm/i915/display/intel_dp.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
>> b/drivers/gpu/drm/i915/display/intel_dp.c
>> index bf80f296a8fd..8cf1d6ca86f4 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -5492,6 +5492,7 @@ intel_dp_init_connector(struct intel_digital_port 
>> *dig_port,
>>      return true;
>>  
>>  fail:
>> +    intel_display_power_flush_work(dev_priv);
>>      drm_connector_cleanup(connector);
>>  
>>      return false;
>> -- 
>> 2.37.2
>> 

-- 
Jani Nikula, Intel Open Source Graphics Center

Reply via email to