git: drm: reject unload while core teardown is incomplete
Aaron LI
aly at crater.dragonflybsd.org
Mon Oct 5 04:08:18 PDT 2026
commit 2f5596630cfecd3fc10028ada23719da9ac6bf92
Author: David Bidner <david at crap.solutions>
Date: Fri Oct 2 13:21:52 2026 +0200
drm: reject unload while core teardown is incomplete
Unloading drm.ko reaches ttm_exit(), which waits for device_released.
The callback which sets that flag is compiled out and device unregister
is a stub, so kldunload sleeps indefinitely while holding the linker
lock. The module event handler has already cleared the Linux task and
process cleanup callbacks by then.
DRM also retains worker threads and undrained RCU callouts, so removing
the TTM wait alone would not make unloading safe. Return EBUSY from
MOD_UNLOAD before changing callbacks or entering SYSUNINIT. Keep the
module usable until complete teardown is implemented.
Bug: https://bugs.dragonflybsd.org/issues/3443
Summary of changes:
sys/dev/drm/drm_drv.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2f5596630cfecd3fc10028ada23719da9ac6bf92
--
DragonFly BSD source repository
More information about the Commits
mailing list