diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-09-21 18:33:18 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-10-01 17:17:57 -0400 |
| commit | f0013046151b7467e62c471c1c83d63ea255799c (patch) | |
| tree | b7c5e47be1bcf387e5e0fe1739298dfc97864707 /tools/perf/scripts/python | |
| parent | f5a5add3605935163dd0f75749b6a7869e9765af (diff) | |
| download | linux-next-f0013046151b7467e62c471c1c83d63ea255799c.tar.gz linux-next-f0013046151b7467e62c471c1c83d63ea255799c.zip | |
drm/amdgpu: fix ACP MFD device leak on init failure
acp_hw_init() registers ACP child devices with mfd_add_devices() before
attaching them to the ACP power domain and initializing the hardware.
If attaching a child to the power domain fails, or if the ACP reset or
clock enable operation times out, the failure path frees only the
source cell, resource, and platform-data allocations. The child
platform devices already registered by mfd_add_devices() remain
registered and are never released.
Remove the children from the power domain and unregister the MFD
devices on failures that occur after mfd_add_devices() succeeds. Keep
mfd_add_devices() failures on the existing cleanup path since the MFD
core already rolls back partially registered children itself.
The issue was identified by a static analysis tool I developed and
confirmed by manual review.
Fixes: 25030321ba28 ("drm/amd: add pm domain for ACP IP sub blocks")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 63da68d6a2279ec945581c990c5a59a5ae8b5560)
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
