witness: lock order reversal: 1st 0xfffffd806ec66ba0 solock (&so->so_lock) 2nd 0xffffffff82bbc680 pf_lock (pf_lock) lock order "pf_lock"(rwlock) -> "&so->so_lock"(rwlock) first seen at: #0 rw_enter_write+0x5c sys/kern/kern_rwlock.c:128 #1 route_input+0x101 sys/net/rtsock.c:520 #2 rtm_send+0x1b2 sys/net/rtsock.c:1744 #3 rt_clone+0xd1 sys/net/route.c:279 #4 rtalloc+0x91 rt_match sys/net/route.c:248 [inline] #4 rtalloc+0x91 sys/net/route.c:377 #5 icmp_reflect+0x1bd sys/netinet/ip_icmp.c:740 #6 icmp_error+0x61 sys/netinet/ip_icmp.c:300 #7 pf_test_rule+0x98d sys/net/pf.c:4476 #8 pf_test+0x1d1c sys/net/pf.c:7676 #9 ip_input_if+0x131 sys/netinet/ip_input.c:417 #10 ipv4_input+0x4c sys/netinet/ip_input.c:291 #11 ether_input+0x58a #12 tun_dev_write+0x203 sys/net/if_tun.c:914 #13 spec_write+0xd9 sys/kern/spec_vnops.c:302 #14 VOP_WRITE+0xc3 sys/kern/vfs_vops.c:245 #15 vn_write+0x15b sys/kern/vfs_vnops.c:408 #16 dofilewritev+0x1a0 sys/kern/sys_generic.c:375 #17 sys_write+0x87 sys/kern/sys_generic.c:295 #18 syscall+0x50f mi_syscall sys/sys/syscall_mi.h:103 [inline] #18 syscall+0x50f sys/arch/amd64/amd64/trap.c:606 lock order "&so->so_lock"(rwlock) -> "pf_lock"(rwlock) first seen at: #0 rw_enter_write+0x5c sys/kern/kern_rwlock.c:128 #1 pf_remove_divert_state+0xbf sys/net/pf.c:1833 #2 in_pcbdisconnect+0x2c sys/netinet/in_pcb.c:578 #3 udp_disconnect+0xf1 sys/netinet/udp_usrreq.c:1189 #4 soconnect+0xc1 pru_disconnect sys/sys/protosw.h:334 [inline] #4 soconnect+0xc1 sodisconnect sys/kern/uipc_socket.c:521 [inline] #4 soconnect+0xc1 sys/kern/uipc_socket.c:485 #5 sys_connect+0x207 sys/kern/uipc_syscalls.c:422 #6 syscall+0x50f mi_syscall sys/sys/syscall_mi.h:103 [inline] #6 syscall+0x50f sys/arch/amd64/amd64/trap.c:606 #7 Xsyscall+0x128 Stopped at db_enter+0x1c: addq $0x8,%rsp