VKMS devices created via ConfigFS can be removed while userspace still holds the device open. drm_dev_unregister() does not stop ioctls, so device removal can race with in-flight ioctls and deadlock against drm_atomic_helper_shutdown().
This series switches ConfigFS device removal to drm_dev_unplug(), which rejects ioctls with -ENODEV after removal, and adds the drm_dev_enter()/drm_dev_exit() guards in the vkms callbacks that drm_dev_unplug() relies on to wait for in-flight operations. Based on v7.4-rc5. v1: https://lists.freedesktop.org/archives/dri-devel/2026-October/609735.html Changes in v2: - Check drm_dev_enter() after vkms_crc_parse_source() in vkms_set_crc_source() so that the composer is also stopped when the CRC source is disabled on a device that is already gone, instead of failing the ioctl and leaving the composer running Sebastian Wick (2): drm/vkms: Add drm_dev_enter/exit guards for hot-removable paths drm/vkms: Use drm_dev_unplug() for ConfigFS device removal drivers/gpu/drm/vkms/vkms_composer.c | 11 ++++++++++- drivers/gpu/drm/vkms/vkms_connector.c | 14 +++++++++++++- drivers/gpu/drm/vkms/vkms_drv.c | 2 +- drivers/gpu/drm/vkms/vkms_writeback.c | 13 +++++++++++-- 4 files changed, 35 insertions(+), 5 deletions(-) -- 2.55.0
