aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorThomas Hellström <[email protected]>2022-06-20 14:36:59 +0200
committerThomas Hellström <[email protected]>2022-07-04 10:25:50 +0200
commit1926a6b75954fc1a8b44d10bd0c67db957b78cf7 (patch)
treec44bfc6a59ed9a805b5347914983d69b28d9c977 /tools/perf/scripts/python/exported-sql-viewer.py
parent99c0b3ce6cbaa42ab602185ec4871424cc0a56a0 (diff)
drm/i915: Fix vm use-after-free in vma destruction
In vma destruction, the following race may occur: Thread 1: Thread 2: i915_vma_destroy(); ... list_del_init(vma->vm_link); ... mutex_unlock(vma->vm->mutex); __i915_vm_release(); release_references(); And in release_reference() we dereference vma->vm to get to the vm gt pointer, leading to a use-after free. However, __i915_vm_release() grabs the vm->mutex so the vm won't be destroyed before vma->vm->mutex is released, so extract the gt pointer under the vm->mutex to avoid the vma->vm dereference in release_references(). v2: Fix a typo in the commit message (Andi Shyti) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5944 Fixes: e1a7ab4fca0c ("drm/i915: Remove the vm open count") Cc: Niranjana Vishwanathapura <[email protected]> Cc: Matthew Auld <[email protected]> Signed-off-by: Thomas Hellström <[email protected]> Acked-by: Nirmoy Das <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions