================================ WARNING: inconsistent lock state 6.10.0-syzkaller-08047-gf2f6a8e88717 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.0.2566/27564 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802c338aa0 (lock#14){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88802c338aa0 (lock#14){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x7f/0x790 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5718 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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] get_mmap_lock_carefully mm/memory.c:5716 [inline] lock_mm_and_find_vma+0xeb/0x6a0 mm/memory.c:5776 do_user_addr_fault+0x2b5/0x13f0 arch/x86/mm/fault.c:1361 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:125 [inline] _copy_from_user+0xc1/0xf0 lib/usercopy.c:28 copy_from_user include/linux/uaccess.h:183 [inline] get_compat_msghdr+0xa8/0x170 net/compat.c:91 recvmsg_copy_msghdr net/socket.c:2780 [inline] ___sys_recvmsg+0x193/0x1a0 net/socket.c:2854 do_recvmmsg+0x51a/0x750 net/socket.c:2944 __sys_recvmmsg+0x21e/0x280 net/socket.c:3031 __do_compat_sys_recvmmsg_time32 net/compat.c:418 [inline] __se_compat_sys_recvmmsg_time32 net/compat.c:414 [inline] __ia32_compat_sys_recvmmsg_time32+0xc4/0x160 net/compat.c:414 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e irq event stamp: 2110 hardirqs last enabled at (2109): [] irqentry_exit+0x3b/0x90 kernel/entry/common.c:357 hardirqs last disabled at (2110): [] sysvec_call_function_single+0xe/0xb0 arch/x86/kernel/smp.c:266 softirqs last enabled at (2044): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (2044): [] bpf_link_alloc_id kernel/bpf/syscall.c:3187 [inline] softirqs last enabled at (2044): [] bpf_link_prime+0x8a/0x4d0 kernel/bpf/syscall.c:3216 softirqs last disabled at (2042): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (2042): [] bpf_link_alloc_id kernel/bpf/syscall.c:3185 [inline] softirqs last disabled at (2042): [] bpf_link_prime+0x5c/0x4d0 kernel/bpf/syscall.c:3216 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#14); lock(lock#14); *** DEADLOCK *** 8 locks held by syz.0.2566/27564: #0: ffffffff8dc2cc88 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_register_prio_may_exist+0x9c/0x110 kernel/tracepoint.c:478 #1: ffffffff8da59070 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_enable+0x12/0x20 kernel/jump_label.c:222 #2: ffffffff8dcc6ea8 (jump_label_mutex){+.+.}-{3:3}, at: jump_label_lock kernel/jump_label.c:27 [inline] #2: ffffffff8dcc6ea8 (jump_label_mutex){+.+.}-{3:3}, at: static_key_enable_cpuslocked+0xb5/0x270 kernel/jump_label.c:207 #3: ffffffff8da76888 (text_mutex){+.+.}-{3:3}, at: arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:145 #4: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #4: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #4: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x42/0x540 mm/pgtable-generic.c:287 #5: ffff888015483078 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #5: ffff888015483078 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0xf1/0x300 mm/pgtable-generic.c:375 #6: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #6: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #6: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #6: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2447 #7: ffff88801cde1e18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #7: ffff88801cde1e18 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x28a/0x760 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 3 PID: 27564 Comm: syz.0.2566 Not tainted 6.10.0-syzkaller-08047-gf2f6a8e88717 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_usage_bug kernel/locking/lockdep.c:3970 [inline] valid_state kernel/locking/lockdep.c:4012 [inline] mark_lock_irq kernel/locking/lockdep.c:4215 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0x1359/0x3b30 kernel/locking/lockdep.c:5090 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5718 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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+0x602/0x760 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x68a/0x710 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1987 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:2406 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0xf3/0x170 include/trace/events/tlb.h:38 csd_do_func kernel/smp.c:134 [inline] __flush_smp_call_function_queue+0x27a/0x8c0 kernel/smp.c:512 __sysvec_call_function_single+0x8c/0x410 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x90/0xb0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:__text_poke+0x609/0xca0 arch/x86/kernel/alternative.c:1960 Code: 00 48 85 db 0f 85 e2 02 00 00 e8 92 f3 5c 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 b0 ee 5c 00 48 85 db 0f 85 b7 05 00 00 72 f3 5c 00 48 8b 7c 24 78 e8 18 3d b5 09 e8 d3 84 b1 09 31 ff RSP: 0018:ffffc90003c7f690 EFLAGS: 00000283 RAX: 0000000000003fb9 RBX: 0000000000000000 RCX: ffffc9002418e000 RDX: 0000000000040000 RSI: ffffffff81317625 RDI: 0000000000000007 RBP: ffffffff813df8d6 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000006 R12: 00000000000008d7 R13: 0000000000000003 R14: ffff88801cde1c80 R15: 0000000000000000 text_poke_bp_batch+0x493/0x760 arch/x86/kernel/alternative.c:2373 text_poke_flush arch/x86/kernel/alternative.c:2486 [inline] text_poke_flush arch/x86/kernel/alternative.c:2483 [inline] text_poke_finish+0x30/0x40 arch/x86/kernel/alternative.c:2493 arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146 jump_label_update+0x1d7/0x400 kernel/jump_label.c:900 static_key_enable_cpuslocked+0x1b7/0x270 kernel/jump_label.c:210 static_key_enable+0x1a/0x20 kernel/jump_label.c:223 tracepoint_add_func+0xa4c/0xe50 kernel/tracepoint.c:361 tracepoint_probe_register_prio_may_exist+0xbd/0x110 kernel/tracepoint.c:482 tracepoint_probe_register_may_exist include/linux/tracepoint.h:52 [inline] bpf_probe_register+0x189/0x200 kernel/trace/bpf_trace.c:2474 bpf_raw_tp_link_attach+0x245/0x540 kernel/bpf/syscall.c:3896 bpf_raw_tracepoint_open kernel/bpf/syscall.c:3927 [inline] __sys_bpf+0x3cc/0x5600 kernel/bpf/syscall.c:5752 __do_sys_bpf kernel/bpf/syscall.c:5817 [inline] __se_sys_bpf kernel/bpf/syscall.c:5815 [inline] __ia32_sys_bpf+0x76/0xe0 kernel/bpf/syscall.c:5815 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7fb5579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5d6656c EFLAGS: 00000296 ORIG_RAX: 0000000000000165 RAX: ffffffffffffffda RBX: 0000000000000011 RCX: 0000000020000080 RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 00 48 85 add %cl,-0x7b(%rax) 3: db 0f fisttpl (%rdi) 5: 85 e2 test %esp,%edx 7: 02 00 add (%rax),%al 9: 00 e8 add %ch,%al b: 92 xchg %eax,%edx c: f3 5c repz pop %rsp e: 00 9c 5b 81 e3 00 02 add %bl,0x200e381(%rbx,%rbx,2) 15: 00 00 add %al,(%rax) 17: 31 ff xor %edi,%edi 19: 48 89 de mov %rbx,%rsi 1c: e8 b0 ee 5c 00 call 0x5ceed1 21: 48 85 db test %rbx,%rbx 24: 0f 85 b7 05 00 00 jne 0x5e1 * 2a: e8 72 f3 5c 00 call 0x5cf3a1 <-- trapping instruction 2f: 48 8b 7c 24 78 mov 0x78(%rsp),%rdi 34: e8 18 3d b5 09 call 0x9b53d51 39: e8 d3 84 b1 09 call 0x9b18511 3e: 31 ff xor %edi,%edi