DragonFlyBSD Kernel Audit
DF-2763 / df2763_run3.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-2763 clean repro: TWO concurrent root churn loops + 3 unpriv writers.
mkdir -p /tmp/jrace && chmod 777 /tmp/jrace
rm -f /root/jc_*.bin
t0=$(date +%s)
churn() {
  local tag=$1
  local n=0
  while [ $(( $(date +%s) - t0 )) -lt 110 ]; do
    n=$((n+1))
    mountctl -a -w /root/jc_${tag}_$n.bin -o memfifo=64k /tmp:$tag >/dev/null 2>&1
    mountctl -d /tmp:$tag >/dev/null 2>&1
    rm -f /root/jc_${tag}_$n.bin
    sleep 0.05
  done
}
( churn c1 & churn c2 & wait ) 
echo DONE-CHURNS