1st 0xfffffd807f00c180 vmmaplk (&map->lock) @ /syzkaller/managers/setuid/kernel/sys/uvm/uvm_fault.c:1442 2nd 0xfffffd80770b5e70 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(57e598b20b5a0c6b,81,fffffd80770b5e60,fffffd80770b5e60,0) at witness_checkorder+0x12f9 witness_debugger sys/kern/subr_witness.c:2543 [inline] witness_checkorder(57e598b20b5a0c6b,81,fffffd80770b5e60,fffffd80770b5e60,0) at witness_checkorder+0x12f9 sys/kern/subr_witness.c:1089 _rw_enter(a206a8c847e10423,60b,fffffd80770b5e60,ffffffff81edebdf) at _rw_enter+0xbf _rrw_enter(4033e71ca854f871,fffffd8076e0a868,ffffffff8139fd50,0) at _rrw_enter+0x5c sys/kern/kern_rwlock.c:410 VOP_LOCK(b787f910b09c0f89,fffffd8076e0a868) at VOP_LOCK+0x55 sys/kern/vfs_vops.c:598 vn_lock(119b8c4f65413bee,1000) at vn_lock+0x6e sys/kern/vfs_vnops.c:549 uvn_io(9c31a88600ec511d,0,0,fffffd80772327a8,0) at uvn_io+0x2ca sys/uvm/uvm_vnode.c:1188 uvn_get(c65ef28f32c858d7,ffffffff8146c190,fffffd80772327a8,fffffd806ac93e38,0,0) at uvn_get+0x206 sys/uvm/uvm_vnode.c:1048 uvm_fault(9c31a8860018a54b,20fff000,0,2) at uvm_fault+0x12c1 sys/uvm/uvm_fault.c:1023 uvm_fault_wire(9ef4b8cedf4c5997,2,20fff000,fffffd806ac93e38) at uvm_fault_wire+0x70 sys/uvm/uvm_fault.c:1293 uvm_map_pageable_wire(b787f910b0ec48b7,fffffd806ac93e38,20fff000,20ff6000,0,4) at uvm_map_pageable_wire+0x2fd sys/uvm/uvm_map.c:2258 uvm_map_protect(5841a2bd45c4a173,10,ffff800020bba270,231352a82d8,0) at uvm_map_protect+0x610 sys/uvm/uvm_map.c:3294 syscall(159cea4c49b6c543) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(159cea4c49b6c543) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffffa4,0,3,22e820e5010) at Xsyscall+0x128 end of kernel end trace frame: 0x231352a8360, count: -14 ddb{1}> show registers rdi 0x3 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800020c6acb0 rbx 0x3 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800002347000 rax 0xffff8000019465c0 r8 0xffffffff817c727f witness_checkorder+0x12cf r9 0x5 r10 0xea6315b3c85cb477 r11 0x9844f08c1eb7e34e r12 0xfffffd80025cdc30 r13 0xffffffff81ebbd52 cmd0646_9_tim_udma+0xc96d r14 0xffffffff822707f0 w_lodata+0x46200 r15 0xffffffff82280440 w_lodata+0x55e50 rip 0xffffffff81107618 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c6aca0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor0) pid=215498 stat=onproc flags process=10 proc=4000000 pri=76, usrpri=76, nice=20 forw=0xffffffffffffffff, list=0xffff800020bbb2d8,0xffffffff82300be0 process=0xffff800020bca9f0 user=0xffff800020c66000, vmspace=0xfffffd807f00c168 estcpu=26, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 52131 112642 44768 32767 2 0x10 syz-executor0 *52131 215498 44768 32767 7 0x4000010 syz-executor0 44768 133943 75226 32767 3 0x90 nanosleep syz-executor0 75226 358686 46949 0 3 0x82 wait syz-executor0 75599 282913 84857 32767 3 0x90 piperd syz-executor1 84857 436126 46949 0 3 0x82 wait syz-executor1 35541 54239 0 0 3 0x14200 bored sosplice 46949 106499 72614 0 3 0x82 thrsleep syz-fuzzer 46949 301849 72614 0 3 0x4000082 nanosleep syz-fuzzer 46949 111005 72614 0 3 0x4000082 thrsleep syz-fuzzer 46949 401631 72614 0 3 0x4000082 thrsleep syz-fuzzer 46949 414 72614 0 3 0x4000082 thrsleep syz-fuzzer 46949 124158 72614 0 3 0x4000082 thrsleep syz-fuzzer 46949 240401 72614 0 3 0x4000082 thrsleep syz-fuzzer 46949 260330 72614 0 3 0x4000082 thrsleep syz-fuzzer 46949 383535 72614 0 3 0x4000082 thrsleep syz-fuzzer 46949 502527 72614 0 3 0x4000082 kqread syz-fuzzer 46949 347535 72614 0 3 0x4000082 thrsleep syz-fuzzer 46949 265359 72614 0 7 0x4000002 syz-fuzzer 72614 483646 16636 0 3 0x10008a pause ksh 16636 178605 49907 0 3 0x92 select sshd 97499 282505 1 0 3 0x100083 ttyin getty 49907 16951 1 0 3 0x80 select sshd 511 138600 95744 73 2 0x100090 syslogd 95744 80710 1 0 3 0x100082 netio syslogd 20965 229562 1 77 3 0x100090 poll dhclient 30902 300304 1 0 3 0x80 poll dhclient 96770 362078 0 0 2 0x14200 zerothread 37453 444183 0 0 3 0x14200 aiodoned aiodoned 1464 424383 0 0 3 0x14200 syncer update 98175 311744 0 0 3 0x14200 cleaner cleaner 22904 261653 0 0 3 0x14200 reaper reaper 69545 363446 0 0 3 0x14200 pgdaemon pagedaemon 58765 258113 0 0 3 0x14200 bored crynlk 45930 373918 0 0 3 0x14200 bored crypto 73597 85027 0 0 3 0x40014200 acpi0 acpi0 19559 199293 0 0 3 0x40014200 idle1 42019 18654 0 0 3 0x14200 bored softnet 13390 251034 0 0 3 0x14200 bored systqmp 53139 503687 0 0 3 0x14200 bored systq 54743 137275 0 0 3 0x40014200 bored softclock 38814 431488 0 0 3 0x40014200 idle0 1 130865 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper