summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorWentao Liang <vulab@iscas.ac.cn>2026-09-16 10:01:39 +0000
committerAlex Deucher <alexander.deucher@amd.com>2026-09-23 15:53:05 -0400
commitaea841bc62a76242396610d22d8ff40c13065f64 (patch)
treed00ba3599672df87d5c26eb0f9c9702abe50373c /tools/perf/scripts/python
parentc3a31087b1c8df679b653c1a09d9abe5ff7ec8ef (diff)
downloadlinux-next-aea841bc62a76242396610d22d8ff40c13065f64.tar.gz
linux-next-aea841bc62a76242396610d22d8ff40c13065f64.zip
drm/amdgpu: Fix vmid_wait fence leak in amdgpu_ring_init()
amdgpu_ring_init() initializes ring->vmid_wait with a reference to the stub fence taken via dma_fence_get_stub(). When a later step of the initialization fails, e.g. amdgpu_fence_driver_init_ring(), a writeback slot allocation or the ring buffer allocation, the function returns an error without releasing the stub fence reference and the reference is leaked if the ring is torn down without amdgpu_ring_fini(). Move the stub fence assignment to the end of the initialization, right before the ring is registered with the GPU scheduler, where no further failure is possible. The stub fence is only consumed by command submission handling in amdgpu_ids.c once the ring is up and running, so nothing reads it during the error-prone part of the initialization. Fixes: 48e9fbd1a284 ("drm/amdgpu: initialize the vmid_wait with the stub fence") Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit f2b96986851203e9c50ca0d13aaa3581ca3e8ebd) Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions