summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorJesse Zhang <Jesse.Zhang@amd.com>2026-10-11 20:15:34 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-10-20 12:06:54 -0400
commit030d47cc6720e0f07b502876cdbd266e309f9461 (patch)
treedb31ddff3e2a1d0a377eb60e9cc583045686bb87 /tools/lib/python
parentec71e978da77f61d5672268ccf6f4be37b83129c (diff)
drm/amdkfd: don't drop an SVM CWSR reference that was never taken
When kfd_queue_acquire_buffers() fails, its error path calls kfd_queue_release_buffers(), which also drops a queue_refcount on the SVM range at ctx_save_restore_area_address. The SVM range is the last buffer acquired, and kfd_queue_buffer_svm_get() takes no reference when it fails, so on every error path this reference was never taken. If another queue of the process uses that CWSR range, its reference is dropped instead, and unmapping the range no longer evicts that queue while its CWSR area is unmapped from the GPU. On navi31, with queue A using an SVM CWSR range: munmap() of the range logs Freeing queue vital buffer 0x..., queue evicted but after a CREATE_QUEUE that reuses A's CWSR address with an unmapped write pointer (-EINVAL), the same munmap() leaves A running without the message. Only put the BOs on the acquire error path. The warning and the eviction are back after the failed CREATE_QUEUE. Fixes: b049504e211e ("drm/amdkfd: Validate user queue svm memory residency") Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 9a08122e6361ef73f4b512d5db9596d561305519) Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions