{
  "verdict": "reproduced",
  "impact": "dos",
  "finding_id": "DF-4918",
  "summary": "drain_workqueue() (linux_workqueue.c:276-281) tsleep()s while holding worker_lock (plain tsleep releases no locks); the worker needs that lock to drain the queue (process_all_work:91), so drain with a non-empty queue deadlocks forever: drainer asleep in wkdrain holding the lock, worker blocked in lwq, later queue_work() callers wedge too. Deterministic module reproduction; fixed by lksleep(); fix validated on rebuilt drm.ko.",
  "reproduce": {
    "build": "kldload drm; cd /tmp/df4918 && make",
    "run": "kldload /tmp/df4918/df4918.ko; sysctl hw.df4918_test=1; sysctl hw.df4918_status; ps -ax -o wchan,stat,comm | grep -E 'wkdrain|df4918'",
    "expected": "baseline: DEADLOCK CONFIRMED line, drain_done=0 filler_done=0 forever, worker wchan=lwq, drainer wchan=wkdrain; patched: drain_done=1 filler_done=1 within seconds, guest healthy"
  },
  "kernel_refs": [
    "sys/dev/drm/linux_workqueue.c:265",
    "sys/dev/drm/linux_workqueue.c:279",
    "sys/dev/drm/linux_workqueue.c:88",
    "sys/dev/drm/linux_workqueue.c:91",
    "sys/dev/drm/linux_workqueue.c:134",
    "sys/dev/drm/linux_workqueue.c:220",
    "sys/dev/drm/linux_workqueue.c:246"
  ],
  "artifacts": [
    "README.md",
    "VERDICT.md",
    "df4918.c",
    "Makefile",
    "build.sh",
    "run.sh",
    "build.log",
    "run.log",
    "run_fixed.log",
    "env.txt",
    "fix.diff",
    "manifest.json",
    "verdict.json"
  ]
}
