drm/amdgpu: fix double free err_addr pointer warnings
Subsystems (2)
PATCH 1/2 drm/amdgpu: fix double free err_addr pointer warnings
In amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages will be run many times so that double free err_addr in some special case. So set the err_addr to NULL to avoid the warnings.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +1 -0
@@ -170,6 +170,7 @@ static void amdgpu_umc_handle_bad_pages(struct amdgpu_device *adev, }kfree (err_data->err_addr); + err_data->err_addr =NULL ;mutex_unlock (&con->page_retirement_lock); }
Signature · 1 line
2.34.1
[Public]
Ping
Regards,
Bob
-----Original Message-----
From: Bob Zhou <[email protected]>
Sent: 2024年4月23日 13:33
To: [email protected]; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Cc: Zhou, Bob <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: fix double free err_addr pointer warnings
In amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages will be run many times so that double free err_addr in some special case. So set the err_addr to NULL to avoid the warnings.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +1 -0
@@ -170,6 +170,7 @@ static void amdgpu_umc_handle_bad_pages(struct amdgpu_device *adev, }kfree (err_data->err_addr); + err_data->err_addr =NULL ;mutex_unlock (&con->page_retirement_lock); }
--
2.34.1
[AMD Official Use Only - General]
________________________________
From: Bob Zhou <[email protected]>
Sent: Tuesday, April 23, 2024 1:32 AM
To: [email protected] <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Cc: Zhou, Bob <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: fix double free err_addr pointer warnings
In amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages will be run many times so that double free err_addr in some special case. So set the err_addr to NULL to avoid the warnings.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +1 -0
@@ -170,6 +170,7 @@ static void amdgpu_umc_handle_bad_pages(struct amdgpu_device *adev, }kfree (err_data->err_addr); + err_data->err_addr =NULL ;mutex_unlock (&con->page_retirement_lock); }
--
2.34.1