[PATCH 0/4] accel/rocket: Fix BO creation and prep_bo handling
From: Sidong Yang
Date: Sat Nov 28 2026 - 01:39:07 EST
This series fixes four bugs in drivers/accel/rocket/rocket_gem.c, based
on drm-misc-fixes:
1. Reject zero (post-PAGE_ALIGN) BO sizes in rocket_ioctl_create_bo() to
prevent a ZERO_SIZE_PTR dereference in sg_alloc_append_table_from_pages().
2. Store iommu_map_sgtable() return values in ssize_t (avoiding int
truncation and leaked IOMMU mappings on >= 2 GiB allocations), size
the drm_mm node from gem_obj->size, and unmap short mappings on error.
3. Skip dma_sync_sgtable_for_cpu() in rocket_ioctl_prep_bo() when the
fence wait fails.
4. Wait on DMA_RESV_USAGE_READ in rocket_ioctl_prep_bo() so PREP_BO also
waits for in-flight jobs that published read fences on input BOs.
Sidong Yang (4):
accel/rocket: Reject zero-sized BO creation
accel/rocket: Fix iommu_map_sgtable() return handling in create_bo
accel/rocket: Skip CPU cache sync when prep_bo wait fails
accel/rocket: Wait for read fences in rocket_ioctl_prep_bo()
drivers/accel/rocket/rocket_gem.c | 43 +++++++++++++++++++++----------
1 file changed, 29 insertions(+), 14 deletions(-)
base-commit: e950f467b8adbfb2f460d9b9454280cdbf597885
--
2.53.0