All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/gpusvm: fix IOVA unmap path in __drm_gpusvm_unmap_pages()
@ 2026-06-27  3:33 Honglei Huang
  2026-06-27  3:33 ` [PATCH 1/2] drm/gpusvm: avoid reading uninitialized dma_addr[0].dir on IOVA unmap Honglei Huang
  2026-06-27  3:33 ` [PATCH 2/2] drm/gpusvm: do not route system pages to device_unmap() " Honglei Huang
  0 siblings, 2 replies; 5+ messages in thread
From: Honglei Huang @ 2026-06-27  3:33 UTC (permalink / raw)
  To: sima, matthew.brost, rodrigo.vivi, thomas.hellstrom, dakr,
	intel-xe
  Cc: Ray.Huang, dri-devel, honghuan

From: Honglei Huang <honghuan@amd.com>

Two small fixes for the IOVA unmap path in __drm_gpusvm_unmap_pages(),
both spotted by AI review:

  - Avoid reading dma_addr[0].dir when no pages were mapped (the
    get_pages() error path can reach unmap with npages == 0 and an
    uninitialised dma_addr array). Use a zeroing allocator and guard the
    direction argument with npages.
  - Do not route system pages to the device_unmap() callback on the IOVA
    path. Branch off addr->proto so system pages only get an explicit
    dma_unmap_page() in the non IOVA case, and only real device pages
    reach device_unmap().

Honglei Huang (2):
  drm/gpusvm: avoid reading uninitialized dma_addr[0].dir on IOVA unmap
  drm/gpusvm: do not route system pages to device_unmap() on IOVA unmap

 drivers/gpu/drm/drm_gpusvm.c | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-06-27  4:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-27  3:33 [PATCH 0/2] drm/gpusvm: fix IOVA unmap path in __drm_gpusvm_unmap_pages() Honglei Huang
2026-06-27  3:33 ` [PATCH 1/2] drm/gpusvm: avoid reading uninitialized dma_addr[0].dir on IOVA unmap Honglei Huang
2026-06-27  3:52   ` sashiko-bot
2026-06-27  3:33 ` [PATCH 2/2] drm/gpusvm: do not route system pages to device_unmap() " Honglei Huang
2026-06-27  4:02   ` 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.