================================ WARNING: inconsistent lock state 6.1.94-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.4/4269 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9935e90 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9935e90 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x84/0x670 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:137 [inline] get_mmap_lock_carefully mm/memory.c:5304 [inline] lock_mm_and_find_vma+0x219/0x2e0 mm/memory.c:5366 do_user_addr_fault arch/x86/mm/fault.c:1312 [inline] handle_page_fault arch/x86/mm/fault.c:1431 [inline] exc_page_fault+0x169/0x620 arch/x86/mm/fault.c:1487 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 irq event stamp: 34 hardirqs last enabled at (33): [] kasan_quarantine_put+0xd4/0x220 mm/kasan/quarantine.c:242 hardirqs last disabled at (34): [] sysvec_call_function_single+0xa/0xb0 arch/x86/kernel/smp.c:262 softirqs last enabled at (0): [] rcu_lock_acquire include/linux/rcupdate.h:350 [inline] softirqs last enabled at (0): [] rcu_read_lock include/linux/rcupdate.h:791 [inline] softirqs last enabled at (0): [] copy_process+0x9e1/0x4060 kernel/fork.c:2132 softirqs last disabled at (0): [<0000000000000000>] 0x0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 3 locks held by syz-executor.4/4269: #0: ffffffff8d718ea8 (tomoyo_ss){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #0: ffffffff8d718ea8 (tomoyo_ss){....}-{0:0}, at: srcu_read_lock include/linux/srcu.h:165 [inline] #0: ffffffff8d718ea8 (tomoyo_ss){....}-{0:0}, at: tomoyo_read_lock security/tomoyo/common.h:1110 [inline] #0: ffffffff8d718ea8 (tomoyo_ss){....}-{0:0}, at: tomoyo_path_number_perm+0x1f2/0x7f0 security/tomoyo/file.c:722 #1: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #1: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #1: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #1: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 #2: ffff888018b4db58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #2: ffff888018b4db58 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x232/0x9c0 kernel/bpf/stackmap.c:144 stack backtrace: CPU: 1 PID: 4269 Comm: syz-executor.4 Not tainted 6.1.94-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 valid_state+0x136/0x1c0 kernel/locking/lockdep.c:3969 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4172 mark_lock+0x21c/0x340 kernel/locking/lockdep.c:4628 mark_usage kernel/locking/lockdep.c:4520 [inline] __lock_acquire+0xb40/0x1f80 kernel/locking/lockdep.c:5003 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:137 [inline] stack_map_get_build_id_offset+0x99e/0x9c0 kernel/bpf/stackmap.c:144 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:452 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1877 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1867 bpf_prog_ec3b2eefa702d8d3+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 trace_tlb_flush+0x151/0x1a0 include/trace/events/tlb.h:38 flush_tlb_func+0x4e3/0x620 arch/x86/mm/tlb.c:875 __flush_smp_call_function_queue+0x2d9/0xd00 kernel/smp.c:641 __sysvec_call_function_single+0xbb/0x360 arch/x86/kernel/smp.c:267 sysvec_call_function_single+0x89/0xb0 arch/x86/kernel/smp.c:262 asm_sysvec_call_function_single+0x16/0x20 arch/x86/include/asm/idtentry.h:661 RIP: 0010:tomoyo_check_acl+0xba/0x3e0 security/tomoyo/domain.c:173 Code: 00 00 4d 8b 37 4d 39 fe 0f 84 e5 01 00 00 49 8d 6e 18 48 89 e8 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 09 01 00 00 0f b6 6d 00 <31> ff 89 ee e8 bd cc 97 fd 85 ed 74 0a e8 54 ca 97 fd e9 b4 00 00 RSP: 0018:ffffc9000310fba0 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000007 RCX: ffff88801fe18000 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000007 RBP: 0000000000000000 R08: ffffffff83f2c946 R09: ffffffff83f46058 R10: 0000000000000002 R11: ffff88801fe18000 R12: 0000000000000000 R13: dffffc0000000000 R14: ffff888141f1c400 R15: ffff8880221bc190 tomoyo_path_number_perm+0x430/0x7f0 security/tomoyo/file.c:733 security_file_ioctl+0x6d/0xa0 security/security.c:1568 __do_sys_ioctl fs/ioctl.c:864 [inline] __se_sys_ioctl+0x47/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fae00e7cc0b Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007fae01bb80f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fae00e7cc0b RDX: 0000000000000000 RSI: 0000000000006364 RDI: 00000000000000d8 RBP: 00007fae00fb3f80 R08: 0000000000000000 R09: 00007ffe4465a227 R10: 0000000000000008 R11: 0000000000000246 R12: ffffffffffffffb0 R13: 000000000000000b R14: 00007ffe4465a140 R15: 00007ffe4465a228 ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: 4d 8b 37 mov (%r15),%r14 5: 4d 39 fe cmp %r15,%r14 8: 0f 84 e5 01 00 00 je 0x1f3 e: 49 8d 6e 18 lea 0x18(%r14),%rbp 12: 48 89 e8 mov %rbp,%rax 15: 48 c1 e8 03 shr $0x3,%rax 19: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax 1e: 84 c0 test %al,%al 20: 0f 85 09 01 00 00 jne 0x12f 26: 0f b6 6d 00 movzbl 0x0(%rbp),%ebp * 2a: 31 ff xor %edi,%edi <-- trapping instruction 2c: 89 ee mov %ebp,%esi 2e: e8 bd cc 97 fd call 0xfd97ccf0 33: 85 ed test %ebp,%ebp 35: 74 0a je 0x41 37: e8 54 ca 97 fd call 0xfd97ca90 3c: e9 .byte 0xe9 3d: b4 00 mov $0x0,%ah