1st 0xfffffd807f00c5b8 vmmaplk (&map->lock) @ /syzkaller/managers/setuid/kernel/sys/uvm/uvm_fault.c:1442 2nd 0xfffffd807a44cb38 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 uvm_map_protect+0x610 #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(8b6b9e5cd49518ef,81,fffffd807a44cb28,fffffd807a44cb28,0) at witness_checkorder+0x12f9 witness_debugger sys/kern/subr_witness.c:2543 [inline] witness_checkorder(8b6b9e5cd49518ef,81,fffffd807a44cb28,fffffd807a44cb28,0) at witness_checkorder+0x12f9 sys/kern/subr_witness.c:1089 _rw_enter(8cc718543df615eb,60b,fffffd807a44cb28,ffffffff81edebdf) at _rw_enter+0xbf _rrw_enter(ecd66887480e15f1,fffffd8069f3b478,ffffffff8139fd50,0) at _rrw_enter+0x5c sys/kern/kern_rwlock.c:410 VOP_LOCK(e82f69bd9173487a,fffffd8069f3b478) at VOP_LOCK+0x55 sys/kern/vfs_vops.c:598 vn_lock(3830f80ca55a933a,1000) at vn_lock+0x6e sys/kern/vfs_vnops.c:549 uvn_io(343b87cf6c7008a8,0,0,fffffd807e7adc68,0) at uvn_io+0x2ca sys/uvm/uvm_vnode.c:1188 uvn_get(9c3306fd89e80193,ffffffff8146c190,fffffd807e7adc68,fffffd8065021c20,0,0) at uvn_get+0x206 sys/uvm/uvm_vnode.c:1048 uvm_fault(343b87cf6c84fcfe,20fff000,0,2) at uvm_fault+0x12c1 sys/uvm/uvm_fault.c:1023 uvm_fault_wire(13cb66ad80fe91b3,2,20fff000,fffffd8065021c20) at uvm_fault_wire+0x70 sys/uvm/uvm_fault.c:1293 uvm_map_pageable_wire(e82f69bd91030f44,fffffd8065021c20,20fff000,20ff6000,0,4) at uvm_map_pageable_wire+0x2fd sys/uvm/uvm_map.c:2258 uvm_map_protect(de4811d4eb741a0,10,ffff800020b92720,6008bcbd3c8,0) at uvm_map_protect+0x610 sys/uvm/uvm_map.c:3294 syscall(7ab38464133affd0) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(7ab38464133affd0) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffffa4,0,3,5fe3faf1010) at Xsyscall+0x128 end of kernel end trace frame: 0x6008bcbd450, count: -14 ddb{1}> show registers rdi 0x3 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800020cb29e0 rbx 0x3 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800001546000 rax 0xffff800001d46000 r8 0xffffffff817c727f witness_checkorder+0x12cf r9 0x5 r10 0x854c7b9b92d08ee4 r11 0x727abe6b15fb709 r12 0xfffffd80025cdc30 r13 0xffffffff81ebbd52 cmd0646_9_tim_udma+0xc96d r14 0xffffffff82271be0 w_lodata+0x475f0 r15 0xffffffff822802e0 w_lodata+0x55cf0 rip 0xffffffff81107618 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020cb29d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor1) pid=226883 stat=onproc flags process=10 proc=4000000 pri=80, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff800020b924c8,0xffffffff82300be0 process=0xffff800020b94358 user=0xffff800020cae000, vmspace=0xfffffd807f00c5a0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 70617 448298 96852 32767 7 0x10 syz-executor1 *70617 226883 96852 32767 7 0x4000010 syz-executor1 81613 33469 96063 32767 3 0x10 biowait syz-executor0 96063 63926 98331 0 3 0x82 wait syz-executor0 96852 377388 14997 32767 3 0x90 nanosleep syz-executor1 14997 348228 98331 0 3 0x82 wait syz-executor1 65865 355851 0 0 3 0x14200 bored sosplice 98331 151852 2369 0 3 0x82 kqread syz-fuzzer 98331 267156 2369 0 3 0x4000082 nanosleep syz-fuzzer 98331 182944 2369 0 3 0x4000082 thrsleep syz-fuzzer 98331 42813 2369 0 3 0x4000082 nanosleep syz-fuzzer 98331 61176 2369 0 3 0x4000082 thrsleep syz-fuzzer 98331 484474 2369 0 3 0x4000082 thrsleep syz-fuzzer 98331 420020 2369 0 3 0x4000082 thrsleep syz-fuzzer 98331 426312 2369 0 3 0x4000082 thrsleep syz-fuzzer 98331 368817 2369 0 3 0x4000082 thrsleep syz-fuzzer 98331 357299 2369 0 3 0x4000082 thrsleep syz-fuzzer 2369 98217 57311 0 3 0x10008a pause ksh 57311 376126 40366 0 3 0x92 select sshd 38264 141144 1 0 3 0x100083 ttyin getty 40366 301803 1 0 3 0x80 select sshd 58503 520724 45674 73 2 0x100090 syslogd 45674 448293 1 0 3 0x100082 netio syslogd 59960 256993 1 77 3 0x100090 poll dhclient 52601 300915 1 0 3 0x80 poll dhclient 28806 237282 0 0 3 0x14200 pgzero zerothread 16938 307922 0 0 3 0x14200 aiodoned aiodoned 69483 198724 0 0 3 0x14200 syncer update 97938 354135 0 0 3 0x14200 cleaner cleaner 93471 496204 0 0 3 0x14200 reaper reaper 95075 224130 0 0 3 0x14200 pgdaemon pagedaemon 84622 133636 0 0 3 0x14200 bored crynlk 84313 42441 0 0 3 0x14200 bored crypto 77770 28661 0 0 3 0x40014200 acpi0 acpi0 6809 87471 0 0 3 0x40014200 idle1 99463 293168 0 0 3 0x14200 bored softnet 77819 466618 0 0 3 0x14200 bored systqmp 53987 39120 0 0 3 0x14200 bored systq 81445 7880 0 0 3 0x40014200 bored softclock 45593 359481 0 0 3 0x40014200 idle0 1 480293 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper