diff options
author | Matthew Auld <[email protected]> | 2022-11-07 16:54:13 +0000 |
---|---|---|
committer | Matthew Auld <[email protected]> | 2022-11-08 09:58:44 +0000 |
commit | 625b74460ec0978979f883fbee117e1b97e6e35e (patch) | |
tree | 75a3d8465203debee8d954dad2199903fc89a065 /scripts | |
parent | 38e0d3fd1ee170ba95f908e1606fbb8763a98593 (diff) |
drm/i915/ttm: fix uaf with lmem_userfault_list handling
In the fault handler, make sure we check if the BO maps lmem after
we schedule the migration, since the current resource might change from
lmem to smem, if the pages are in the non-cpu visible portion of lmem.
This then leads to adding the object to the lmem_userfault_list even
though the current resource is no longer lmem. If we then destroy the
object, the list might still contain a link to the now free object, since
we only remove it if the object is still in lmem.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7469
Fixes: ad74457a6b5a ("drm/i915/dgfx: Release mmap on rpm suspend")
Signed-off-by: Matthew Auld <[email protected]>
Cc: Anshuman Gupta <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Andrzej Hajda <[email protected]>
Cc: Nirmoy Das <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions