diff options
| author | Nikita Zhandarovich <[email protected]> | 2023-04-13 15:12:28 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-04-18 20:28:54 +0000 |
| commit | 20c3dffdccbd494e0dd631d1660aeecbff6775f2 (patch) | |
| tree | 73d5d315ad7ceaead3e74a6b60e9b3c8b715a6d5 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |
| parent | drm/amd/display: remove unused variable oldest_index (diff) | |
| download | kernel-20c3dffdccbd494e0dd631d1660aeecbff6775f2.tar.gz kernel-20c3dffdccbd494e0dd631d1660aeecbff6775f2.zip | |
radeon: avoid double free in ci_dpm_init()
Several calls to ci_dpm_fini() will attempt to free resources that
either have been freed before or haven't been allocated yet. This
may lead to undefined or dangerous behaviour.
For instance, if r600_parse_extended_power_table() fails, it might
call r600_free_extended_power_table() as will ci_dpm_fini() later
during error handling.
Fix this by only freeing pointers to objects previously allocated.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
Fixes: cc8dbbb4f62a ("drm/radeon: add dpm support for CI dGPUs (v2)")
Co-developed-by: Natalia Petrova <[email protected]>
Signed-off-by: Nikita Zhandarovich <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
0 files changed, 0 insertions, 0 deletions
