DragonFlyBSD Kernel Audit
DF-0762 / fix_run.log
← back to finding ↓ download raw
=== DF-0762 PATCHED-KERNEL RUN on 6.5-DEVELOPMENT #1 (single-fix kernel) ===
Fix: removed bogus `hammer2_spin_unex(&parent->core.spin)` at the no-parent
else-branch retry path (line 654). parent is NULL there and its spinlock is
never acquired, so the release was both a NULL-deref and an unheld-lock release.

Patched kernel: DragonFly 6.5-DEVELOPMENT #1: Thu Jul  9 12:55:57 UTC 2026
  (built from patched /usr/src; hammer2 built-in via options HAMMER2)
Bug line confirmed GONE in running source (/usr/src/sys/vfs/hammer2/hammer2_chain.c).

--- Run on patched kernel: ./h2_churn 120 10 6 6 ---
DF-0762: hammer2 churn on /h2test, duration=120s (crud=10 rename=6 tree=6 sync=1)
DF-0762: if the kernel panics in hammer2_chain_lastdrop / page-fault at a low address, the bug is reproduced.
DF-0762: churn finished without local error. Check serial console / dmesg for hammer2_chain_lastdrop panic.
BG_DONE rc=0
guest status after: up ; boot.log line delta: 0 (no panic, no regression)

RESULT: patched kernel compiles, boots, and runs the identical hammer2 churn
workload with no panic and no regression. The offending line is removed by
construction; the no-parent branch now only releases the locks it actually
holds (chain->core.spin + chain->lock).