[SRU][J][PATCH 1/1] drm/amdgpu: fix ttm_bo calltrace warning in psp_hw_fini
Tim Whisonant
tim.whisonant at canonical.com
Tue Oct 7 19:38:19 UTC 2025
From: Horatio Zhang <Hongkun.Zhang at amd.com>
The call trace occurs when the amdgpu is removed after
the mode1 reset. During mode1 reset, from suspend to resume,
there is no need to reinitialize the ta firmware buffer
which caused the bo pin_count increase redundantly.
[ 489.885525] Call Trace:
[ 489.885525] <TASK>
[ 489.885526] amdttm_bo_put+0x34/0x50 [amdttm]
[ 489.885529] amdgpu_bo_free_kernel+0xe8/0x130 [amdgpu]
[ 489.885620] psp_free_shared_bufs+0xb7/0x150 [amdgpu]
[ 489.885720] psp_hw_fini+0xce/0x170 [amdgpu]
[ 489.885815] amdgpu_device_fini_hw+0x2ff/0x413 [amdgpu]
[ 489.885960] ? blocking_notifier_chain_unregister+0x56/0xb0
[ 489.885962] amdgpu_driver_unload_kms+0x51/0x60 [amdgpu]
[ 489.886049] amdgpu_pci_remove+0x5a/0x140 [amdgpu]
[ 489.886132] ? __pm_runtime_resume+0x60/0x90
[ 489.886134] pci_device_remove+0x3e/0xb0
[ 489.886135] __device_release_driver+0x1ab/0x2a0
[ 489.886137] driver_detach+0xf3/0x140
[ 489.886138] bus_remove_driver+0x6c/0xf0
[ 489.886140] driver_unregister+0x31/0x60
[ 489.886141] pci_unregister_driver+0x40/0x90
[ 489.886142] amdgpu_exit+0x15/0x451 [amdgpu]
Signed-off-by: Horatio Zhang <Hongkun.Zhang at amd.com>
Signed-off-by: longlyao <Longlong.Yao at amd.com>
Reviewed-by: Guchun Chen <guchun.chen at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
(backported from commit 23f4a2d29ba57bf88095f817de5809d427fcbe7e)
[tswhison: adjusted context due to missing commits
f03d97b0bd96 ("drm/amdgpu/psp: drop load/unload/init_shared_buf wrappers")
ac1509d19e2e ("drm/amdgpu: Create common PSP TA load function")
3f83f17b7311 ("drm/amdgpu: Conform ASD header/loading to generic TA systems")]
CVE-2023-53074
Signed-off-by: Tim Whisonant <tim.whisonant at canonical.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 64bf24b64446b..88edcab924398 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -1670,7 +1670,7 @@ static int psp_hdcp_initialize(struct psp_context *psp)
return 0;
}
- if (!psp->hdcp_context.context.initialized) {
+ if (!psp->hdcp_context.context.mem_context.shared_buf) {
ret = psp_hdcp_init_shared_buf(psp);
if (ret)
return ret;
@@ -1804,7 +1804,7 @@ static int psp_dtm_initialize(struct psp_context *psp)
return 0;
}
- if (!psp->dtm_context.context.initialized) {
+ if (!psp->dtm_context.context.mem_context.shared_buf) {
ret = psp_dtm_init_shared_buf(psp);
if (ret)
return ret;
@@ -1947,7 +1947,7 @@ static int psp_rap_initialize(struct psp_context *psp)
return 0;
}
- if (!psp->rap_context.context.initialized) {
+ if (!psp->rap_context.context.mem_context.shared_buf) {
ret = psp_rap_init_shared_buf(psp);
if (ret)
return ret;
--
2.43.0
More information about the kernel-team
mailing list