> virtio_gpu_vram_map_deferred() ignores errors from
> virtio_gpu_vram_map(). If mapping fails before RESOURCE_MAP_BLOB
> is queued, virtio_gpu_vram_mmap() still waits for a response
> that will never arrive.
> 
> This can happen when drm_mm_insert_node() finds no room in
> host_visible_mm. Since no command is sent, map_state remains
> STATE_INITIALIZING. The task then waits indefinitely while holding
> mmap_lock, and SIGKILL cannot terminate it. Any user with render
> node access can trigger this by mmapping a deferred-mapping blob
> larger than the host visible region.
> 
> Propagate the error so mmap() returns instead of waiting.
> 
> Tested on Linux v7.3 with QEMU (virtio-gpu-gl, blob=true,
> hostmem=256M).
> 
> Fixes: 4c26e162947f ("drm/virtio: Extend blob UAPI with deferred-mapping 
> hinting")
> Signed-off-by: Changyul Lee <[email protected]>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1


Reply via email to