witness: lock order reversal: 1st 0xffff800010fdb978 sbufsnd (&so->so_snd.sb_lock) 2nd 0xffffee80656b3da0 inode (&ip->i_lock) lock order [1] sbufsnd (&so->so_snd.sb_lock) -> [2] inode (&ip->i_lock) lock order data 0xffffffff8355a0e1 -> 0xffffffff834c9efc is missing lock order [2] inode (&ip->i_lock) -> [3] sbufrcv (&so->so_rcv.sb_lock) #0 rw_do_enter_write+0xae sys/kern/kern_rwlock.c:234 #1 sblock+0xb6 sys/kern/uipc_socket2.c:536 #2 soreceive+0x289 sys/kern/uipc_socket.c:890 #3 fifo_read+0x117 sys/miscfs/fifofs/fifo_vnops.c:264 #4 VOP_READ+0x101 sys/kern/vfs_vops.c:227 #5 vn_rdwr+0x15b sys/kern/vfs_vnops.c:-1 #6 vndsetcred+0xa1 sys/dev/vnd.c:685 #7 vndioctl+0xdfc sys/dev/vnd.c:486 #8 VOP_IOCTL+0xac sys/kern/vfs_vops.c:264 #9 vn_ioctl+0xf8 sys/kern/vfs_vnops.c:537 #10 sys_ioctl+0x674 sys/kern/sys_generic.c:-1 #11 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #11 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 #12 Xsyscall+0x128 lock order [3] sbufrcv (&so->so_rcv.sb_lock) -> [1] sbufsnd (&so->so_snd.sb_lock) #0 rw_do_enter_write+0xae sys/kern/kern_rwlock.c:234 #1 sblock+0xb6 sys/kern/uipc_socket2.c:536 #2 sosplice+0x246 sys/kern/uipc_socket.c:1326 #3 sys_setsockopt+0x2ce sys/kern/uipc_syscalls.c:1234 #4 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 #5 Xsyscall+0x128 Stopped at db_enter+0x25: addq $0x8,%rsp ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic the kernel did not panic ddb{1}> show kasan No such command ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 witness_checkorder(ffffee80656b3da0,9,0) at witness_checkorder+0x10cd sys/kern/subr_witness.c:-1 rw_do_enter_write(ffffee80656b3d88,1) at rw_do_enter_write+0xae sys/kern/kern_rwlock.c:234 rrw_enter(ffffee80656b3d88,1) at rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 VOP_LOCK(ffffee806d2fe970,2001) at VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 vn_lock(ffffee806d2fe970,2001) at vn_lock+0xa4 sys/kern/vfs_vnops.c:576 vfs_lookup(ffff80002ab63380) at vfs_lookup+0x10e sys/kern/vfs_lookup.c:431 namei(ffff80002ab63380) at namei+0x5ea sys/kern/vfs_lookup.c:250 unp_connect(ffff800010fdb790,ffffee806c3e7f00,ffff80002a236548) at unp_connect+0x29c sys/kern/uipc_usrreq.c:875 uipc_dgram_send(ffff800010fdb790,ffffee806f95a700,ffffee806c3e7f00,0) at uipc_dgram_send+0x152 sys/kern/uipc_usrreq.c:609 sosend(ffff800010fdb790,ffffee806c3e7f00,ffff80002ab63608,0,0,c) at sosend+0x7f4 sys/kern/uipc_socket.c:-1 sendit(ffff80002a236548,5,ffff80002ab63788,c,ffff80002ab63840) at sendit+0x5a5 sys/kern/uipc_syscalls.c:785 sys_sendmsg(ffff80002a236548,ffff80002ab638f0,ffff80002ab63840) at sys_sendmsg+0x246 sys/kern/uipc_syscalls.c:603 syscall(ffff80002ab638f0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002ab638f0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xef33129dfe0, count: -15 ddb{1}> show registers rdi 0 rsi 0x80000 acpi_pdirpa+0x6be71 rbp 0xffff80002ab62ff0 rbx 0 rdx 0xffff8000016045c0 rcx 0xffff80002a236548 rax 0x7ffff acpi_pdirpa+0x6be70 r8 0xffff80002ab62ed0 r9 0x8080808080808080 r10 0x14438ff6bd38ef8 r11 0x7fcacf65d96bc8d6 r12 0xffffee80040efa00 r13 0xffffee80048d72c8 r14 0x3 r15 0xffffffff8356508a substchar+0x1048f rip 0xffffffff820ea785 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002ab62fe0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=9069 pid=86885 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=78, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a236fa8,0xffff80002a237a18 process=0xffff800038b984f8 user=0xffff80002ab5e000, vmspace=0xffffee806c6f6d80 estcpu=28, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 77810 321808 38881 0 2 0x40 0 syz-executor 49533 123486 7474 0 2 0x2 0 syz-executor 1894 103048 86007 0 7 0 0 syz-executor 1894 291495 86007 0 2 0 0x4000000 syz-executor 86885 221529 72468 0 2 0 0 syz-executor *86885 9069 72468 0 7 0 0x4000000 syz-executor 38881 97616 7474 0 3 0x82 0 ppwait syz-executor 41544 492122 23859 0 3 0x2 0 clonelk ifconfig 74616 216540 85538 0 3 0x2 0 clonelk ifconfig 23859 69836 14737 0 3 0x100002 0x88 sigsusp sh 85538 304516 92080 0 3 0x100002 0x88 sigsusp sh 14737 261755 7474 0 3 0x2 0x80 wait syz-executor 92080 291645 7474 0 3 0x2 0x80 wait syz-executor 14452 64259 7474 0 3 0x2 0 clonelk syz-executor 86007 135645 7474 0 3 0x2 0x80 nanoslp syz-executor 27143 478193 1 0 3 0 0x80 nanoslp init 72468 177686 7474 0 3 0x2 0x80 nanoslp syz-executor 7474 165752 1 0 3 0x2 0x80 wait syz-executor 52098 67570 0 0 3 0x14000 0x200 bored smr 89901 143840 0 0 2 0x14000 0x200 zerothread 41429 473900 0 0 3 0x14000 0x200 aiodoned aiodoned 1316 356545 0 0 3 0x14000 0x200 syncer update 93702 90484 0 0 3 0x14000 0x200 cleaner cleaner 30147 452943 0 0 3 0x14000 0x200 reaper reaper 9360 109704 0 0 3 0x14000 0x200 pgdaemon pagedaemon 96469 358557 0 0 3 0x14000 0x200 bored viomb 64315 47861 0 0 3 0x14000 0x40000200 acpi0 acpi0 91692 495655 0 0 3 0x14000 0x40000200 idle1 18561 212636 0 0 3 0x14000 0x200 bored softnet1 62248 234316 0 0 2 0x14000 0x200 softnet0 45043 341736 0 0 3 0x14000 0x200 smrbar systqmp 83826 315090 0 0 3 0x14000 0x200 bored systq 83637 515829 0 0 3 0x14000 0x200 tmoslp softclockmp 85949 192938 0 0 3 0x14000 0x40000200 tmoslp softclock 90584 252093 0 0 3 0x14000 0x40000200 idle0 1 399772 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{1}>