DF-5011 / run-fix.sh
#!/bin/sh # DF-5011 fix-validation run — dimm.ko built with fix.diff, dep-less user # pocfix (mirrors ecc_e3.c). Expect: unload vetoed while a live ref exists, # object intact, victim can destroy its ref properly, clean unload after. set -x kldload /root/df5011/dimm-fixed.ko kldload /root/df5011/pocfix.ko sysctl hw.dimminfo | head -1 kldunload dimm-fixed echo "FIXED(pocfix holds live ref): kldunload rc=$? (expect failure=1)" sysctl hw.dimminfo | head -1 dmesg | grep "still referenced" | tail -1 kldunload pocfix echo "pocfix proper destroy+unload rc=$?" sysctl hw.dimminfo echo "hw.dimminfo gone (rc=$?) = proper destroy by the owner" kldunload dimm-fixed echo "FIXED(list empty): kldunload rc=$? (expect 0)" kldstat | grep dimm || echo "dimm.ko cleanly unloaded at end" |