1st 0xfffffd807f00cb58 vmmaplk (&map->lock) @ /syzkaller/managers/setuid/kernel/sys/uvm/uvm_fault.c:1442 2nd 0xfffffd8076a77c48 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{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(20b6b6a0143cc55b,81,fffffd8076a77c38,fffffd8076a77c38,0) at witness_checkorder+0x12f9 witness_debugger sys/kern/subr_witness.c:2543 [inline] witness_checkorder(20b6b6a0143cc55b,81,fffffd8076a77c38,fffffd8076a77c38,0) at witness_checkorder+0x12f9 sys/kern/subr_witness.c:1089 _rw_enter(ec77b3260ccfa8cd,60b,fffffd8076a77c38,ffffffff81edebdf) at _rw_enter+0xbf _rrw_enter(5fd4df17a08f2001,fffffd8076d7cca8,ffffffff8139fd50,0) at _rrw_enter+0x5c sys/kern/kern_rwlock.c:410 VOP_LOCK(10a9d1a8293d0552,fffffd8076d7cca8) at VOP_LOCK+0x55 sys/kern/vfs_vops.c:598 vn_lock(8a85bdaeaf759d77,1000) at vn_lock+0x6e sys/kern/vfs_vnops.c:549 uvn_io(55cc0b4adbce3090,0,0,fffffd80785ee7f8,0) at uvn_io+0x2ca sys/uvm/uvm_vnode.c:1188 uvn_get(dd01d1063dab50a3,ffffffff8146c190,fffffd80785ee7f8,fffffd806b080548,0,1) at uvn_get+0x206 sys/uvm/uvm_vnode.c:1048 uvm_fault(55cc0b4adb3ac4c6,20ffd000,0,1) at uvm_fault+0x12c1 sys/uvm/uvm_fault.c:1023 uvm_fault_wire(41e0ab9cef017689,1,20ffd000,fffffd806b080548) at uvm_fault_wire+0x70 sys/uvm/uvm_fault.c:1293 uvm_map_pageable_wire(10a9d1a8294d426c,fffffd806b080548,21000000,20ff7000,0,4) at uvm_map_pageable_wire+0x2fd sys/uvm/uvm_map.c:2258 uvm_map_protect(ac2743d107a79fcb,10,ffff800020b93c38,d33506c4678,0) at uvm_map_protect+0x610 sys/uvm/uvm_map.c:3294 syscall(5da9f0975ba9f5d7) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(5da9f0975ba9f5d7) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffffa4,0,3,d3067035010) at Xsyscall+0x128 end of kernel end trace frame: 0xd33506c4700, count: -14 ddb{0}> show registers rdi 0x3 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800020c7c9b0 rbx 0x3 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff80000454c000 rax 0xffff800001d46b40 r8 0xffffffff817c727f witness_checkorder+0x12cf r9 0x5 r10 0xa2560f68da4384e3 r11 0x38ce55f2dbf4893c r12 0xfffffd80025cdc30 r13 0xffffffff81ebbd52 cmd0646_9_tim_udma+0xc96d r14 0xffffffff82278ca0 w_lodata+0x4e6b0 r15 0xffffffff82280440 w_lodata+0x55e50 rip 0xffffffff81107618 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c7c9a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor1) pid=65760 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b92018,0xffff800020b92988 process=0xffff800020b94358 user=0xffff800020c78000, vmspace=0xfffffd807f00cb40 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 65667 479783 32194 32767 7 0x10 syz-executor0 65667 492661 32194 32767 2 0x4000090 syz-executor0 86590 157395 75574 32767 2 0x10 syz-executor1 *86590 65760 75574 32767 7 0x4000010 syz-executor1 32194 431273 30882 32767 3 0x90 nanosleep syz-executor0 30882 80827 45886 0 3 0x82 wait syz-executor0 75574 214780 80652 32767 3 0x90 nanosleep syz-executor1 80652 351263 45886 0 3 0x82 wait syz-executor1 24832 197311 0 0 3 0x14200 bored sosplice 45886 26682 78515 0 3 0x82 thrsleep syz-fuzzer 45886 65862 78515 0 3 0x4000082 thrsleep syz-fuzzer 45886 74515 78515 0 3 0x4000082 thrsleep syz-fuzzer 45886 165000 78515 0 3 0x4000082 thrsleep syz-fuzzer 45886 161778 78515 0 3 0x4000082 thrsleep syz-fuzzer 45886 275947 78515 0 3 0x4000082 thrsleep syz-fuzzer 45886 331349 78515 0 3 0x4000082 thrsleep syz-fuzzer 45886 417424 78515 0 3 0x4000082 thrsleep syz-fuzzer 45886 39102 78515 0 3 0x4000082 kqread syz-fuzzer 45886 34533 78515 0 3 0x4000082 thrsleep syz-fuzzer 78515 147147 76417 0 3 0x10008a pause ksh 76417 380401 1549 0 3 0x92 select sshd 75150 64142 1 0 3 0x100083 ttyin getty 1549 384828 1 0 3 0x80 select sshd 10538 344744 9353 73 2 0x100090 syslogd 9353 190670 1 0 3 0x100082 netio syslogd 13864 306540 1 77 3 0x100090 poll dhclient 34555 301983 1 0 3 0x80 poll dhclient 52481 406685 0 0 2 0x14200 zerothread 53743 167053 0 0 3 0x14200 aiodoned aiodoned 90044 201171 0 0 3 0x14200 syncer update 57442 481211 0 0 3 0x14200 cleaner cleaner 29765 66964 0 0 3 0x14200 reaper reaper 77319 214402 0 0 3 0x14200 pgdaemon pagedaemon 3228 511690 0 0 3 0x14200 bored crynlk 44258 243359 0 0 3 0x14200 bored crypto 43631 211910 0 0 3 0x40014200 acpi0 acpi0 21691 329593 0 0 3 0x40014200 idle1 8109 163234 0 0 3 0x14200 bored softnet 94347 219050 0 0 3 0x14200 bored systqmp 24782 420171 0 0 3 0x14200 bored systq 74638 274480 0 0 3 0x40014200 bored softclock 23352 279975 0 0 3 0x40014200 idle0 1 429240 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper