Commit ac16667
drm/amd/pm: fix a double-free in si_dpm_init
When the allocation of
adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries fails,
amdgpu_free_extended_power_table is called to free some fields of adev.
However, when the control flow returns to si_dpm_sw_init, it goes to
label dpm_failed and calls si_dpm_fini, which calls
amdgpu_free_extended_power_table again and free those fields again. Thus
a double-free is triggered.
Fixes: 841686d ("drm/amdgpu: add SI DPM support (v4)")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>1 parent 804c49e commit ac16667
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7379 | 7379 | | |
7380 | 7380 | | |
7381 | 7381 | | |
7382 | | - | |
7383 | | - | |
| 7382 | + | |
7384 | 7383 | | |
7385 | | - | |
| 7384 | + | |
7386 | 7385 | | |
7387 | 7386 | | |
7388 | 7387 | | |
| |||
0 commit comments