diff options
| author | Lizhi Hou <lizhi.hou@amd.com> | 2026-09-23 13:05:01 -0700 |
|---|---|---|
| committer | Lizhi Hou <lizhi.hou@amd.com> | 2026-09-24 08:29:47 -0700 |
| commit | f7afecd54296cf7ad6fa36f692d2a7427e32f25d (patch) | |
| tree | 0edec01b6cf5d060ee86f4f94c2e48b08ee5580c /tools/perf/scripts/python/stackcollapse.py | |
| parent | 92be213ad653a6b785bf465f0d259b4eba6d9207 (diff) | |
| download | linux-f7afecd54296cf7ad6fa36f692d2a7427e32f25d.tar.gz linux-f7afecd54296cf7ad6fa36f692d2a7427e32f25d.zip | |
accel/amdxdna: Preallocate hardware context schedulers
The hardware context scheduler fence is exposed through
drm_syncobj_add_point(). After a hardware context is destroyed,
userspace can still call drm_sched_fence_get_timeline_name() on the
fence through SYNC_IOC_FILE_INFO. This results in a use-after-free
when accessing fence->sched->name.
Preallocate hardware context schedulers and free them during device
teardown instead. A destroyed hardware context no longer frees its
scheduler, ensuring that the scheduler remains valid while its fences
are still accessible.
Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reported-by: Jonghyuk Kim(MalHyuk) <malhyuk97@gmail.com>
Link: https://lore.kernel.org/dri-devel/20260902012712.880520-1-malhyuk97@gmail.com/
Reviewed-by: Max Zhen <max.zhen@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260923200501.281208-1-lizhi.hou@amd.com
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
