1st 0xfffffd807f00d2e8 vmmaplk (&map->lock) @ /syzkaller/managers/setuid/kernel/sys/uvm/uvm_fault.c:1442 2nd 0xfffffd806cc16b38 inode (&ip->i_lock) @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 lock order "&ip->i_lock"(rrwlock) -> "&map->lock"(rwlock) first seen at: #0 witness_checkorder+0x6d8 #1 _rw_enter+0xbf #2 vm_map_lock_ln+0x14e #3 uvm_map+0x2e2 #4 km_alloc+0x19a #5 pool_multi_alloc_ni+0xe4 #6 pool_p_alloc+0x70 #7 pool_do_get+0x127 #8 pool_get+0x104 #9 ufsdirhash_build+0x40b #10 ufs_lookup+0x2a5 #11 VOP_LOOKUP+0x63 #12 vfs_lookup+0x552 #13 namei+0x4af #14 start_init+0xd6 lock order "&map->lock"(rwlock) -> "&ip->i_lock"(rrwlock) first seen at: #0 witness_checkorder+0x6d8 #1 _rw_enter+0xbf #2 _rrw_enter+0x5c #3 VOP_LOCK+0x55 #4 vn_lock+0x6e #5 uvn_io+0x2ca #6 uvn_get+0x206 #7 uvm_fault+0x12c1 #8 uvm_fault_wire+0x70 #9 uvm_map_pageable_wire+0x2fd #10 sys_mlock+0x187 #11 syscall+0x5a0 #12 Xsyscall+0x128 Stopped at db_enter+0x18: addq $0x8,%rsp ddb{1}> ddb{1}> set $lines = 0 ddb{1}> show panic the kernel did not panic ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 witness_checkorder(11a9e0d1169a20fc,81,fffffd806cc16b28,fffffd806cc16b28,0) at witness_checkorder+0x12f9 witness_debugger sys/kern/subr_witness.c:2543 [inline] witness_checkorder(11a9e0d1169a20fc,81,fffffd806cc16b28,fffffd806cc16b28,0) at witness_checkorder+0x12f9 sys/kern/subr_witness.c:1089 _rw_enter(164ba632a2d6f7f5,60b,fffffd806cc16b28,ffffffff81ee1643) at _rw_enter+0xbf _rrw_enter(4e62914b4d43ad90,fffffd80795584c8,ffffffff81c4fb70,0) at _rrw_enter+0x5c sys/kern/kern_rwlock.c:410 VOP_LOCK(232909b21f4fd30c,fffffd80795584c8) at VOP_LOCK+0x55 sys/kern/vfs_vops.c:598 vn_lock(94ecdcb40e093d9d,1000) at vn_lock+0x6e sys/kern/vfs_vnops.c:549 uvn_io(5d05dd3225e51a3d,0,0,fffffd8069e669d8,0) at uvn_io+0x2ca sys/uvm/uvm_vnode.c:1188 uvn_get(95c71cd62567aa17,ffffffff817d4e70,fffffd8069e669d8,fffffd8069d4b840,0,1) at uvn_get+0x206 sys/uvm/uvm_vnode.c:1048 uvm_fault(95c71cd6256652e6,20010000,0,3) at uvm_fault+0x12c1 sys/uvm/uvm_fault.c:1023 uvm_fault_wire(e1c54326738ca275,3,20010000,fffffd8069d4b840) at uvm_fault_wire+0x70 sys/uvm/uvm_fault.c:1293 uvm_map_pageable_wire(2bc8c1fd3a02bc1e,20801000,20001000,800000,fffffd807f00d2d0,800000) at uvm_map_pageable_wire+0x2fd sys/uvm/uvm_map.c:2258 sys_mlock(11a9e0d1166973f3,10,ffff800020b92018) at sys_mlock+0x187 sys/uvm/uvm_mmap.c:740 syscall(4c041abb6adfb2e8) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(4c041abb6adfb2e8) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffffa1,0,2,fa6859a1010) at Xsyscall+0x128 end of kernel end trace frame: 0xfa92af8f940, count: -14 ddb{1}> show registers rdi 0x3 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800020caef30 rbx 0x3 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800001146000 rax 0xffff80000434bd00 r8 0xffffffff8142346f witness_checkorder+0x12cf r9 0x5 r10 0xab2b97d036168fac r11 0xb23492fbd179406c r12 0xfffffd80025cec30 r13 0xffffffff81ebc499 cmd0646_9_tim_udma+0xded3 r14 0xffffffff82270a50 w_lodata+0x47070 r15 0xffffffff8227f830 w_lodata+0x55e50 rip 0xffffffff81391848 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020caef20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor1) pid=127471 stat=onproc flags process=10 proc=4000000 pri=73, usrpri=73, nice=20 forw=0xffffffffffffffff, list=0xffff800020b932d8,0xffffffff82319e38 process=0xffff800020b94d30 user=0xffff800020caa000, vmspace=0xfffffd807f00d2d0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 96019 217491 16102 32767 7 0x10 syz-executor1 *96019 127471 16102 32767 7 0x4000010 syz-executor1 16102 223659 52629 32767 3 0x90 nanosleep syz-executor1 52629 111179 68242 0 3 0x82 wait syz-executor1 15957 349666 23986 32767 3 0x90 nanosleep syz-executor0 23986 47467 68242 0 3 0x82 wait syz-executor0 78509 451676 0 0 3 0x14200 bored sosplice 68242 80846 15409 0 3 0x82 thrsleep syz-fuzzer 68242 6199 15409 0 3 0x4000082 nanosleep syz-fuzzer 68242 523916 15409 0 3 0x4000082 thrsleep syz-fuzzer 68242 268579 15409 0 3 0x4000082 thrsleep syz-fuzzer 68242 80764 15409 0 3 0x4000082 thrsleep syz-fuzzer 68242 412608 15409 0 3 0x4000082 thrsleep syz-fuzzer 68242 196838 15409 0 3 0x4000082 kqread syz-fuzzer 68242 264528 15409 0 3 0x4000082 thrsleep syz-fuzzer 68242 392961 15409 0 3 0x4000082 nanosleep syz-fuzzer 68242 309743 15409 0 3 0x4000082 thrsleep syz-fuzzer 68242 298570 15409 0 3 0x4000082 thrsleep syz-fuzzer 15409 447637 25596 0 3 0x10008a pause ksh 25596 413732 54940 0 3 0x92 select sshd 10178 15785 1 0 3 0x100083 ttyin getty 54940 111884 1 0 3 0x80 select sshd 17658 166219 17213 73 2 0x100090 syslogd 17213 69826 1 0 3 0x100082 netio syslogd 92651 225342 1 77 3 0x100090 poll dhclient 90304 325027 1 0 3 0x80 poll dhclient 80425 266988 0 0 3 0x14200 pgzero zerothread 45978 47705 0 0 3 0x14200 aiodoned aiodoned 25275 124282 0 0 3 0x14200 syncer update 32549 487353 0 0 3 0x14200 cleaner cleaner 25388 15123 0 0 3 0x14200 reaper reaper 37417 68843 0 0 3 0x14200 pgdaemon pagedaemon 31865 332962 0 0 3 0x14200 bored crynlk 8987 165057 0 0 3 0x14200 bored crypto 50100 404748 0 0 3 0x40014200 acpi0 acpi0 61636 441442 0 0 3 0x40014200 idle1 42601 210426 0 0 3 0x14200 bored softnet 42407 421197 0 0 3 0x14200 bored systqmp 3022 519759 0 0 3 0x14200 bored systq 85594 282101 0 0 3 0x40014200 bored softclock 99830 352115 0 0 3 0x40014200 idle0 1 106617 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper