All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] drm/amdgpu: fix bugs when amdgpu_vm_ptes_update fails
@ 2026-09-14 20:25 Thadeu Lima de Souza Cascardo
  2026-09-14 20:25 ` [PATCH 1/4] drm/amdgpu: make amdgpu_vm_sdma_commit handle NULL or empty job Thadeu Lima de Souza Cascardo
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2026-09-14 20:25 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Simona Vetter,
	Felix Kuehling, Rajneesh Bhardwaj, Shashank Sharma
  Cc: amd-gfx, dri-devel, Tvrtko Ursulin, Thadeu Lima de Souza Cascardo,
	kernel-dev, Natalie Vock

When amdgpu_vm_ptes_update fails, there might be jobs leak and mappings
might be kept in an on-stack list, which will lead to invalid list
walking later on.

One of the approaches that was attempted was introducing an abort
function to amdgpu_vm_update_funcs. But given the possibility that some
mappings have already been pushed and committed and some may have been
moved to tlb_flush_waitlist, do a partial commit instead and return the
error to amdgpu_vm_update_range caller.

Also, fix amdgpu_vm_clear_freed ignoring the result of
amdgpu_vm_update_range.

I just noticed a different fix for the latter was submitted at [1]. It
re-adds the mapping to the freed list instead of not removing it when
amdgpu_vm_update_range fails.

[1] https://lore.kernel.org/amd-gfx/20260905023151.90699-1-oushinnyo@163.com/

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
---
Thadeu Lima de Souza Cascardo (4):
      drm/amdgpu: make amdgpu_vm_sdma_commit handle NULL or empty job
      drm/amdgpu: make amdgpu_vm_update_funcs commit return void
      drm/amdgpu: don't free mapping when amdgpu_vm_update_range fails
      drm/amdgpu: commit pending work when amdgpu_vm_ptes_update fails

 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c      | 14 +++++---------
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h      |  4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c  |  8 +++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 26 ++++++++++++++++----------
 5 files changed, 27 insertions(+), 27 deletions(-)
---
base-commit: 59ced288fcba9e91bd38e61a972ad782c4edb7d0
change-id: 20260914-amdgpu_vm_fixes-d64d1478657e

Best regards,
--  
Thadeu Lima de Souza Cascardo <cascardo@igalia.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-09-24 12:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 20:25 [PATCH 0/4] drm/amdgpu: fix bugs when amdgpu_vm_ptes_update fails Thadeu Lima de Souza Cascardo
2026-09-14 20:25 ` [PATCH 1/4] drm/amdgpu: make amdgpu_vm_sdma_commit handle NULL or empty job Thadeu Lima de Souza Cascardo
2026-09-14 20:25 ` [PATCH 2/4] drm/amdgpu: make amdgpu_vm_update_funcs commit return void Thadeu Lima de Souza Cascardo
2026-09-14 20:25 ` [PATCH 3/4] drm/amdgpu: don't free mapping when amdgpu_vm_update_range fails Thadeu Lima de Souza Cascardo
2026-09-14 20:43   ` sashiko-bot
2026-09-15  8:33   ` Christian König
2026-09-15  8:53     ` Natalie Vock
2026-09-15 10:37       ` Thadeu Lima de Souza Cascardo
2026-09-15 11:22         ` Christian König
2026-09-15 11:34           ` Thadeu Lima de Souza Cascardo
2026-09-15 13:56             ` Christian König
2026-09-23 13:56               ` Thadeu Lima de Souza Cascardo
2026-09-23 13:58                 ` Christian König
2026-09-23 14:18                   ` Thadeu Lima de Souza Cascardo
2026-09-23 14:51                     ` Christian König
2026-09-14 20:25 ` [PATCH 4/4] drm/amdgpu: commit pending work when amdgpu_vm_ptes_update fails Thadeu Lima de Souza Cascardo
2026-09-14 20:42   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.