[AMD Official Use Only]


>-----Original Message-----
>From: Koenig, Christian <[email protected]>
>Sent: Thursday, October 21, 2021 3:27 PM
>To: Yu, Lang <[email protected]>; Grodzovsky, Andrey
><[email protected]>
>Cc: Deucher, Alexander <[email protected]>; Huang, Ray
><[email protected]>
>Subject: Re: [PATCH 1/3] drm/amdgpu: fix a potential memory leak in
>amdgpu_device_fini_sw()
>
>Is there any reason you are sending that around only internally and not to the
>public mailing list?

Sorry, I missed that. It’s a mistake.

Regards,
Lang

>Christian.
>
>Am 21.10.21 um 09:17 schrieb Lang Yu:
>> amdgpu_fence_driver_sw_fini() should be executed before
>> amdgpu_device_ip_fini(), otherwise fence driver resource won't be
>> properly freed as adev->rings have been tore down.
>>
>> Fixes: 72c8c97b1522 ("drm/amdgpu: Split amdgpu_device_fini into early
>> and late")
>>
>> Signed-off-by: Lang Yu <[email protected]>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index 41ce86244144..5654c4790773 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -3843,8 +3843,8 @@ void amdgpu_device_fini_hw(struct amdgpu_device
>> *adev)
>>
>>   void amdgpu_device_fini_sw(struct amdgpu_device *adev)
>>   {
>> -    amdgpu_device_ip_fini(adev);
>>      amdgpu_fence_driver_sw_fini(adev);
>> +    amdgpu_device_ip_fini(adev);
>>      release_firmware(adev->firmware.gpu_info_fw);
>>      adev->firmware.gpu_info_fw = NULL;
>>      adev->accel_working = false;

Reply via email to