diff options
| author | Jackie Liu <liuyun01@kylinos.cn> | 2026-10-26 19:10:47 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-11-18 01:49:59 -0500 |
| commit | 5b148562d193fd63e5d1ae3c442d3d54403c7e51 (patch) | |
| tree | 7994bfa1210eba60b069da68169e34f65f001f57 /tools/perf/scripts/python/bin | |
| parent | 2b784f5e78694d4d852053b3eef3de3f0ff1d02e (diff) | |
drm/amd/display: Fix logger leak on perf trace allocation failure
dc_construct_ctx() allocates a logger and stores an alias in dc->dml.logger
before allocating the performance trace object. If dc_perf_trace_create()
fails, the function frees dc_ctx without releasing the logger. Since
dc->ctx is assigned only after the trace allocation succeeds,
dc_destruct() cannot reclaim the logger on this error path.
Free the logger before discarding dc_ctx and clear dc->dml.logger to avoid
leaving a dangling alias after the failed construction.
Fixes: 5d72e247e58c ("drm/amd/display: switch DC over to the new DRM logging macros")
Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ac088505e74932f276ea6e3bbe19713e5770e7a1)
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
