================================ WARNING: inconsistent lock state 6.9.0-rc5-syzkaller-01452-ga9e7715ce8b3 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.3/5265 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b95387e8 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b95387e8 (lock#10){?.+.}-{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_read_trylock include/linux/mmap_lock.h:166 [inline] get_mmap_lock_carefully mm/memory.c:5633 [inline] lock_mm_and_find_vma+0x213/0x2f0 mm/memory.c:5693 do_user_addr_fault arch/x86/mm/fault.c:1385 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x1a9/0x8e0 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 strncpy_from_user+0x110/0x2f0 lib/strncpy_from_user.c:139 bpf_prog_load+0xd65/0x20f0 kernel/bpf/syscall.c:2849 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5682 __do_sys_bpf kernel/bpf/syscall.c:5789 [inline] __se_sys_bpf kernel/bpf/syscall.c:5787 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5787 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 78 hardirqs last enabled at (77): [] lruvec_stat_mod_folio include/linux/vmstat.h:569 [inline] hardirqs last enabled at (77): [] __kmalloc_large_node+0x102/0x1f0 mm/slub.c:3914 hardirqs last disabled at (78): [] sysvec_call_function_single+0xe/0xc0 arch/x86/kernel/smp.c:266 softirqs last enabled at (0): [] rcu_lock_acquire include/linux/rcupdate.h:329 [inline] softirqs last enabled at (0): [] rcu_read_lock include/linux/rcupdate.h:781 [inline] softirqs last enabled at (0): [] copy_process+0xa03/0x3df0 kernel/fork.c:2259 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 *** 2 locks held by syz-executor.3/5265: #0: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #0: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444 #1: ffff88807a70a7a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #1: ffff88807a70a7a0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5265 Comm: syz-executor.3 Not tainted 6.9.0-rc5-syzkaller-01452-ga9e7715ce8b3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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:166 [inline] stack_map_get_build_id_offset+0x9b2/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_e6cf5f9c69743609+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 __traceiter_tlb_flush+0x77/0xd0 include/trace/events/tlb.h:38 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:find_stack lib/stackdepot.c:552 [inline] RIP: 0010:stack_depot_save_flags+0x160/0x830 lib/stackdepot.c:618 Code: de c1 c3 18 41 29 de 48 8b 05 4c b4 bb 0f 8b 0d 3e b4 bb 0f 44 21 f1 48 c1 e1 04 48 8d 14 08 65 ff 05 cc ea 1a 7b 4c 8b 3c 08 <49> 39 d7 8b 6c 24 04 0f 84 96 00 00 00 45 89 cd eb 34 90 0f 0b 90 RSP: 0018:ffffc90004c26c40 EFLAGS: 00000282 RAX: ffff88823ac00000 RBX: 00000000c27678e5 RCX: 0000000000aa2320 RDX: ffff88823b6a2320 RSI: 0000000000000001 RDI: 00000000d81aa603 RBP: 00000000b15ca067 R08: ffffc90004c26ca0 R09: 000000000000000b R10: dffffc0000000000 R11: fffffbfff1f526ce R12: 0000000000000008 R13: 00000000ffffffff R14: 00000000956aa232 R15: ffff888079615280 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_save_track+0x51/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:3966 [inline] __kmalloc_node+0x253/0x4e0 mm/slub.c:3973 kmalloc_node include/linux/slab.h:648 [inline] __vmalloc_area_node mm/vmalloc.c:3623 [inline] __vmalloc_node_range+0x5f9/0x1490 mm/vmalloc.c:3818 __vmalloc_node mm/vmalloc.c:3883 [inline] vzalloc+0x79/0x90 mm/vmalloc.c:3956 bpf_check+0x253/0x18a90 kernel/bpf/verifier.c:21496 bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2908 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5682 __do_sys_bpf kernel/bpf/syscall.c:5789 [inline] __se_sys_bpf kernel/bpf/syscall.c:5787 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5787 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f698327dca9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6983fff0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f69833abf80 RCX: 00007f698327dca9 RDX: 0000000000000090 RSI: 0000000020000280 RDI: 0000000000000005 RBP: 00007f69832c947e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f69833abf80 R15: 00007fffb4f17318 ---------------- Code disassembly (best guess): 0: de c1 faddp %st,%st(1) 2: c3 ret 3: 18 41 29 sbb %al,0x29(%rcx) 6: de 48 8b fimuls -0x75(%rax) 9: 05 4c b4 bb 0f add $0xfbbb44c,%eax e: 8b 0d 3e b4 bb 0f mov 0xfbbb43e(%rip),%ecx # 0xfbbb452 14: 44 21 f1 and %r14d,%ecx 17: 48 c1 e1 04 shl $0x4,%rcx 1b: 48 8d 14 08 lea (%rax,%rcx,1),%rdx 1f: 65 ff 05 cc ea 1a 7b incl %gs:0x7b1aeacc(%rip) # 0x7b1aeaf2 26: 4c 8b 3c 08 mov (%rax,%rcx,1),%r15 * 2a: 49 39 d7 cmp %rdx,%r15 <-- trapping instruction 2d: 8b 6c 24 04 mov 0x4(%rsp),%ebp 31: 0f 84 96 00 00 00 je 0xcd 37: 45 89 cd mov %r9d,%r13d 3a: eb 34 jmp 0x70 3c: 90 nop 3d: 0f 0b ud2 3f: 90 nop