All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] drm/vkms: Fix races on ConfigFS device removal
@ 2026-12-05  0:16 Sebastian Wick
  2026-12-05  0:17 ` [PATCH v2 1/2] drm/vkms: Add drm_dev_enter/exit guards for hot-removable paths Sebastian Wick
  2026-12-05  0:17 ` [PATCH v2 2/2] drm/vkms: Use drm_dev_unplug() for ConfigFS device removal Sebastian Wick
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Wick @ 2026-12-05  0:16 UTC (permalink / raw)
  To: dri-devel
  Cc: louis.chauvet, hamohammed.sa, simona, melissa.srw,
	maarten.lankhorst, mripard, tzimmermann, airlied, Sebastian Wick

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


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

end of thread, other threads:[~2026-12-05  0:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05  0:16 [PATCH v2 0/2] drm/vkms: Fix races on ConfigFS device removal Sebastian Wick
2026-12-05  0:17 ` [PATCH v2 1/2] drm/vkms: Add drm_dev_enter/exit guards for hot-removable paths Sebastian Wick
2026-12-05  0:42   ` sashiko-bot
2026-12-05  0:17 ` [PATCH v2 2/2] drm/vkms: Use drm_dev_unplug() for ConfigFS device removal Sebastian Wick
2026-12-05  0:34   ` 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.