⬢ DragonFlyBSD Kernel Audit
DF-5138 / unload_hang.txt
← back to finding ↓ download raw
During DF-5138 fix validation on the audit guest (DragonFly 6.5-DEVELOPMENT,
kernel built Thu Jul 2 06:02:54 UTC 2026) an ENVIRONMENT limitation was hit
that is unrelated to the finding or the fix, recorded here so the timeline is
honest:

  $ kldunload drm
  (never returns; process state D2, unkillable)

`kldunload drm` of the STOCK (unpatched) drm.ko hangs in drm's MOD_UNLOAD
path (likely linux-compat workqueue/RCU drain with no devices attached).
Every later kldstat/kldload then blocks on the kernel linker lock:

  root  2014  D2  6:20AM  kldunload drm
  root  2025  D1  6:24AM  kldstat
  root  2049  D0  6:25AM  kldload drm
  ...

The hang predates any patched module being loaded (the patched drm.ko was
never loaded before the first hang). The guest was recovered with a clean
`shutdown -r now`, after which the patched drm.ko loaded instantly
(`kldload drm` returned in well under a second) and the fix-validation run
(fix_run.log) succeeded. Final state: guest `vm.sh reset with-src` (clean).