1st 0xfffffd807f00d450 vmmaplk (&map->lock) @ /syzkaller/managers/setuid/kernel/sys/uvm/uvm_fault.c:1442 2nd 0xfffffd807a959e68 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{0}> ddb{0}> set $lines = 0 ddb{0}> show panic the kernel did not panic ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 witness_checkorder(36eb46b177b1c58d,81,fffffd807a959e58,fffffd807a959e58,0) at witness_checkorder+0x12f9 witness_debugger sys/kern/subr_witness.c:2543 [inline] witness_checkorder(36eb46b177b1c58d,81,fffffd807a959e58,fffffd807a959e58,0) at witness_checkorder+0x12f9 sys/kern/subr_witness.c:1089 _rw_enter(69a225f9ff23f209,60b,fffffd807a959e58,ffffffff81ee1643) at _rw_enter+0xbf _rrw_enter(f09fde249317f8d1,fffffd807c1537a0,ffffffff81c4fb70,0) at _rrw_enter+0x5c sys/kern/kern_rwlock.c:410 VOP_LOCK(3ff6a5e159ea33ba,fffffd807c1537a0) at VOP_LOCK+0x55 sys/kern/vfs_vops.c:598 vn_lock(f31a5694bdd7619b,1000) at vn_lock+0x6e sys/kern/vfs_vnops.c:549 uvn_io(667b6a451bd28d92,0,0,fffffd807bc42cb8,0) at uvn_io+0x2ca sys/uvm/uvm_vnode.c:1188 uvn_get(528f81da63f15c20,ffffffff817d4e70,fffffd807bc42cb8,fffffd807ba5f2d8,0,1) at uvn_get+0x206 sys/uvm/uvm_vnode.c:1048 uvm_fault(528f81da63f0a4d1,20010000,0,3) at uvm_fault+0x12c1 sys/uvm/uvm_fault.c:1023 uvm_fault_wire(8cbe1dbaa367fcdc,3,20010000,fffffd807ba5f2d8) at uvm_fault_wire+0x70 sys/uvm/uvm_fault.c:1293 uvm_map_pageable_wire(ff41f4e7e0e24a14,20801000,20001000,800000,fffffd807f00d438,800000) at uvm_map_pageable_wire+0x2fd sys/uvm/uvm_map.c:2258 sys_mlock(36eb46b177429682,10,ffff800020b92720) at sys_mlock+0x187 sys/uvm/uvm_mmap.c:740 syscall(3e59c83428256080) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(3e59c83428256080) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffffa1,0,2,fe77fc17010) at Xsyscall+0x128 end of kernel end trace frame: 0xfea22b0dda0, count: -14 ddb{0}> show registers rdi 0x3 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800020cc8f40 rbx 0x3 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800000946000 rax 0xffff800001b46fc0 r8 0xffffffff8142346f witness_checkorder+0x12cf r9 0x5 r10 0x91743f503992aad7 r11 0x671e356fd20a1fb0 r12 0xfffffd80025cec30 r13 0xffffffff81ebc499 cmd0646_9_tim_udma+0xded3 r14 0xffffffff8226c9b0 w_lodata+0x42fd0 r15 0xffffffff8227f6d0 w_lodata+0x55cf0 rip 0xffffffff81391848 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020cc8f30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor1) pid=389445 stat=onproc flags process=10 proc=4000000 pri=80, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff800020b74710,0xffffffff82319e38 process=0xffff800020b95078 user=0xffff800020cc4000, vmspace=0xfffffd807f00d438 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 62258 254631 77479 32767 2 0x10 syz-executor1 *62258 389445 77479 32767 7 0x4000010 syz-executor1 77093 275347 87516 32767 2 0x490 syz-executor0 87516 304178 37363 0 3 0x82 wait syz-executor0 77479 398056 73310 32767 7 0x490 syz-executor1 73310 409741 37363 0 3 0x82 wait syz-executor1 26319 396680 0 0 3 0x14200 bored sosplice 37363 362432 25921 0 3 0x82 thrsleep syz-fuzzer 37363 447639 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 290902 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 397664 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 375678 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 153958 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 488747 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 327396 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 8336 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 35377 25921 0 3 0x4000082 thrsleep syz-fuzzer 37363 89754 25921 0 3 0x4000082 kqread syz-fuzzer 37363 152333 25921 0 3 0x4000082 thrsleep syz-fuzzer 25921 367014 24377 0 3 0x10008a pause ksh 24377 282350 30641 0 3 0x92 select sshd 33211 295796 1 0 3 0x100083 ttyin getty 30641 276051 1 0 3 0x80 select sshd 58730 237485 37553 73 2 0x100090 syslogd 37553 469545 1 0 3 0x100082 netio syslogd 9961 188694 1 77 3 0x100090 poll dhclient 27364 306989 1 0 3 0x80 poll dhclient 45685 415052 0 0 2 0x14200 zerothread 11940 434586 0 0 3 0x14200 aiodoned aiodoned 67036 297084 0 0 3 0x14200 syncer update 81338 199718 0 0 3 0x14200 cleaner cleaner 79359 486698 0 0 3 0x14200 reaper reaper 34004 163419 0 0 3 0x14200 pgdaemon pagedaemon 56880 333998 0 0 3 0x14200 bored crynlk 2274 418027 0 0 3 0x14200 bored crypto 46511 302231 0 0 3 0x40014200 acpi0 acpi0 41202 202659 0 0 3 0x40014200 idle1 81347 370367 0 0 3 0x14200 bored softnet 72181 53755 0 0 3 0x14200 bored systqmp 67880 33559 0 0 3 0x14200 bored systq 43959 461319 0 0 2 0x40014200 softclock 17883 230361 0 0 3 0x40014200 idle0 1 375675 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper