Skip to content

Commit 506c245

Browse files
Bob Zhoualexdeucher
authored andcommitted
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. Signed-off-by: Bob Zhou <bob.zhou@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 7bfd16d commit 506c245

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ void amdgpu_umc_handle_bad_pages(struct amdgpu_device *adev,
179179
}
180180

181181
kfree(err_data->err_addr);
182+
err_data->err_addr = NULL;
182183

183184
mutex_unlock(&con->page_retirement_lock);
184185
}

0 commit comments

Comments
 (0)