summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLizhi Hou <lizhi.hou@amd.com>2026-09-17 08:48:24 -0700
committerLizhi Hou <lizhi.hou@amd.com>2026-09-17 13:08:00 -0700
commitac18f34f5927e420ae529be72aec86201a262d04 (patch)
treee448834435aa150cef94d5cf132af1d9e062953c /tools/perf/scripts/python
parent5eee433b5c97821979e7de58476dc245ee168d89 (diff)
downloadlinux-ac18f34f5927e420ae529be72aec86201a262d04.tar.gz
linux-ac18f34f5927e420ae529be72aec86201a262d04.zip
accel/amdxdna: Fix race between unmap and free BO
A userspace process can concurrently trigger an unmap, which queues hmm_unreg_work, and free BO. If amdxdna_hmm_unreg_work() executes list_del(&mapp->node) and is preempted before calling amdxdna_umap_put(), amdxdna_hmm_unregister_all() can fail to find the mapping in the list and return without calling cancel_work_sync(). This allows object destruction to proceed while the worker still holds a pointer to the BO in the umap structure. Moving the work item from struct amdxdna_umap to struct amdxdna_gem_obj. The worker no longer holds a pointer to an individual mapping, so there is no longer a window where the umap has been unlinked from umap_list but work is still pending against it. The work item now lives in the BO itself, so use a single cancel_work_sync() in the free path to drain the work. Fixes: 445d20910429 ("accel/amdxdna: Fix unexpected wait when flushing notifier_wq") Reviewed-by: Max Zhen <max.zhen@amd.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Link: https://patch.msgid.link/20260917154824.1872220-1-lizhi.hou@amd.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions