diff options
author | Matthew Auld <matthew.auld@intel.com> | 2024-09-24 16:09:48 +0100 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2024-09-26 14:28:06 +0100 |
commit | d28af0b6b9580b9f90c265a7da0315b0ad20bbfd (patch) | |
tree | 09148a50c4f87014cddd13c7bddec11d3010b60a /tools/perf/scripts/python | |
parent | fe4f5d4b661666a45b48fe7f95443f8fefc09c8c (diff) |
drm/xe/guc_submit: add missing locking in wedged_fini
Any non-wedged queue can have a zero refcount here and can be running
concurrently with an async queue destroy, therefore dereferencing the
queue ptr to check wedge status after the lookup can trigger UAF if
queue is not wedged. Fix this by keeping the submission_state lock held
around the check to postpone the free and make the check safe, before
dropping again around the put() to avoid the deadlock.
Fixes: 8ed9aaae39f3 ("drm/xe: Force wedged state and block GT reset upon any GPU hang")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924150947.118433-2-matthew.auld@intel.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions