# DF-3119 verification

Kernel: DragonFly dfbsd 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64

## Bottom line

Code-proven teardown accounting defect, not dynamically triggerable without first forcing a HAMMER_MOUNT_CRITICAL_ERROR unmount (requires induced media I/O failure). In this tree flg->refs counts records only (increments hammer_inode.c:2057/2311/2391/2408, decrements hammer_object.c:322 + hammer_inode.c:1575) while inodes never take a reference, yet hammer_destroy_inode_callback executes a --ip->flush_group->refs for every HAMMER_FST_FLUSH inode at critical-error unmount, driving refs negative and printing the spurious flush_group was not empty warning in hammer_free_hmp. Fix drops the unmatched decrement; compile-validated.

## Kernel references
- sys/vfs/hammer/hammer_flusher.c:423
- sys/vfs/hammer/hammer_inode.c:1594-1598

## Exploit chain
(none: availability/correctness finding; no privilege chain)

## Fix

drop the unmatched decrement

See fix.diff in this directory (git-apply-able against the read-only sys/
tree; applied only inside the disposable verification guest).

## Reproduction

build: n/a

run: n/a

expected: n/a

## Notes on the PoC (what changed vs the finding sketch)

(none)

## Fix status (batch validation)
Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest `make -j6 nativekernel KERNCONF=X86_64_GENERIC` completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.
