DF-3450 / racer.sh
#!/bin/sh # DF-3450: race kldunload ip_mrace against in-flight encap4_input dispatch. # ip_mroute MOD_UNLOAD NULLs the ipip_input hook under mroute_token -- but # encap4_input() reads/calls it with no token and the unload path performs # no netisr drain -- so the call can land in module text that the linker # has already unmapped. KMOD=/usr/obj/usr/src/sys/net/ip_mroute/ip_mroute.ko i=0 while :; do kldload $KMOD 2>/dev/null kldunload ip_mroute 2>/dev/null i=$((i+1)) if [ $((i % 50)) -eq 0 ]; then echo "racer: $i load/unload cycles" fi done |