================================ WARNING: inconsistent lock state 6.10.0-rc7-syzkaller-00266-g4d145e3f830b #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.3.972/9170 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b95387e8 (lock#12){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b95387e8 (lock#12){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_write_lock_killable include/linux/mmap_lock.h:123 [inline] dup_mmap kernel/fork.c:638 [inline] dup_mm kernel/fork.c:1688 [inline] copy_mm+0x1f8c/0x2020 kernel/fork.c:1737 copy_process+0x187a/0x3dc0 kernel/fork.c:2390 kernel_clone+0x223/0x870 kernel/fork.c:2797 __do_sys_clone kernel/fork.c:2940 [inline] __se_sys_clone kernel/fork.c:2924 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2924 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 3412 hardirqs last enabled at (3411): [] ___slab_alloc+0xac6/0x14b0 mm/slub.c:3577 hardirqs last disabled at (3412): [] sysvec_call_function_single+0xe/0xc0 arch/x86/kernel/smp.c:266 softirqs last enabled at (1220): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (1220): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (1220): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (1123): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (1123): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (1123): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#12); lock(lock#12); *** DEADLOCK *** 3 locks held by syz.3.972/9170: #0: ffff88807b5ea590 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] #0: ffff88807b5ea590 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: fuse_cache_write_iter fs/fuse/file.c:1424 [inline] #0: ffff88807b5ea590 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: fuse_file_write_iter+0x2b4/0xf60 fs/fuse/file.c:1726 #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444 #2: ffff88806a749498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #2: ffff88806a749498 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 9170 Comm: syz.3.972 Not tainted 6.10.0-rc7-syzkaller-00266-g4d145e3f830b #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+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4216 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 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:164 [inline] stack_map_get_build_id_offset+0x9af/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1994 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1984 bpf_prog_ec3b2eefa702d8d3+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 flush_tlb_func+0x4e7/0x630 arch/x86/mm/tlb.c:892 csd_do_func kernel/smp.c:133 [inline] __flush_smp_call_function_queue+0x3fc/0x1690 kernel/smp.c:511 __sysvec_call_function_single+0xb8/0x430 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x9e/0xc0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:lock_release+0x630/0x9f0 kernel/locking/lockdep.c:5778 Code: 3c 3b 00 74 08 4c 89 f7 e8 1d 12 86 00 f6 84 24 91 00 00 00 02 75 77 41 f7 c5 00 02 00 00 74 01 fb 48 c7 44 24 60 0e 36 e0 45 <4b> c7 04 27 00 00 00 00 4b c7 44 27 08 00 00 00 00 65 48 8b 04 25 RSP: 0018:ffffc9000edf6d60 EFLAGS: 00000206 RAX: 0000000000000001 RBX: 1ffff92001dbedbe RCX: ffffc9000edf6d03 RDX: 0000000000000001 RSI: ffffffff8bcaccc0 RDI: ffffffff8c1f5540 RBP: ffffc9000edf6e90 R08: ffffffff8fac692f R09: 1ffffffff1f58d25 R10: dffffc0000000000 R11: fffffbfff1f58d26 R12: 1ffff92001dbedb8 R13: 0000000000000246 R14: ffffc9000edf6df0 R15: dffffc0000000000 rcu_lock_release include/linux/rcupdate.h:339 [inline] rcu_read_unlock include/linux/rcupdate.h:812 [inline] is_bpf_text_address+0x280/0x2a0 kernel/bpf/core.c:769 kernel_text_address+0xa7/0xe0 kernel/extable.c:125 __kernel_text_address+0xd/0x40 kernel/extable.c:79 unwind_get_return_address+0x5d/0xc0 arch/x86/kernel/unwind_orc.c:369 arch_stack_walk+0x125/0x1b0 arch/x86/kernel/stacktrace.c:26 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4123 [inline] __kmalloc_noprof+0x1f9/0x400 mm/slub.c:4136 kmalloc_noprof include/linux/slab.h:664 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] fuse_pages_alloc fs/fuse/fuse_i.h:1006 [inline] fuse_io_alloc fs/fuse/file.c:735 [inline] fuse_direct_io+0x23c6/0x2ce0 fs/fuse/file.c:1618 fuse_direct_IO+0x97e/0x13a0 fs/fuse/file.c:3041 generic_file_direct_write+0x130/0x350 mm/filemap.c:3941 fuse_cache_write_iter fs/fuse/file.c:1441 [inline] fuse_file_write_iter+0xb7c/0xf60 fs/fuse/file.c:1726 aio_write+0x570/0x7d0 fs/aio.c:1642 io_submit_one+0x8a7/0x18b0 fs/aio.c:2061 __do_sys_io_submit fs/aio.c:2120 [inline] __se_sys_io_submit+0x179/0x2f0 fs/aio.c:2090 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2c8b375bd9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2c8c1e4048 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 00007f2c8b503f60 RCX: 00007f2c8b375bd9 RDX: 0000000020000780 RSI: 0000000000000002 RDI: 00007f2c8c19a000 RBP: 00007f2c8b3e4e60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f2c8b503f60 R15: 00007ffc69955c48 ---------------- Code disassembly (best guess): 0: 3c 3b cmp $0x3b,%al 2: 00 74 08 4c add %dh,0x4c(%rax,%rcx,1) 6: 89 f7 mov %esi,%edi 8: e8 1d 12 86 00 call 0x86122a d: f6 84 24 91 00 00 00 testb $0x2,0x91(%rsp) 14: 02 15: 75 77 jne 0x8e 17: 41 f7 c5 00 02 00 00 test $0x200,%r13d 1e: 74 01 je 0x21 20: fb sti 21: 48 c7 44 24 60 0e 36 movq $0x45e0360e,0x60(%rsp) 28: e0 45 * 2a: 4b c7 04 27 00 00 00 movq $0x0,(%r15,%r12,1) <-- trapping instruction 31: 00 32: 4b c7 44 27 08 00 00 movq $0x0,0x8(%r15,%r12,1) 39: 00 00 3b: 65 gs 3c: 48 rex.W 3d: 8b .byte 0x8b 3e: 04 25 add $0x25,%al