================================ WARNING: inconsistent lock state 6.9.0-syzkaller-12123-g531876c80004 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.4/5106 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9538828 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538828 (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_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock include/linux/mmap_lock.h:170 [inline] do_user_addr_fault arch/x86/mm/fault.c:1417 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x7a2/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x33/0x70 arch/x86/lib/copy_user_64.S:57 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline] _copy_to_user+0x86/0xb0 lib/usercopy.c:46 copy_to_user include/linux/uaccess.h:191 [inline] btf_get_info_by_fd+0x224/0x750 kernel/bpf/btf.c:7550 bpf_btf_get_info_by_fd kernel/bpf/syscall.c:4930 [inline] bpf_obj_get_info_by_fd+0xd75/0x40f0 kernel/bpf/syscall.c:4994 __sys_bpf+0x685/0x810 kernel/bpf/syscall.c:5748 __do_sys_bpf kernel/bpf/syscall.c:5816 [inline] __se_sys_bpf kernel/bpf/syscall.c:5814 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5814 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: 1758644 hardirqs last enabled at (1758643): [] irqentry_exit+0x63/0x90 kernel/entry/common.c:357 hardirqs last disabled at (1758644): [] sysvec_apic_timer_interrupt+0xe/0xc0 arch/x86/kernel/apic/apic.c:1043 softirqs last enabled at (1758446): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (1758446): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (1758446): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (1758339): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (1758339): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (1758339): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 4 locks held by syz-executor.4/5106: #0: ffff8880b952c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: hrtimer_interrupt+0xfb/0x990 kernel/time/hrtimer.c:1794 #1: ffffffff8e34df88 (tk_core.seq.seqcount){----}-{0:0}, at: ktime_get_update_offsets_now+0x3c/0x250 kernel/time/timekeeping.c:2320 #2: ffffffff8e333e60 (rcu_read_lock){....}-{1:2}, at: trace_call_bpf+0xbc/0x8a0 #3: ffff888066e33118 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #3: ffff888066e33118 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5106 Comm: syz-executor.4 Not tainted 6.9.0-syzkaller-12123-g531876c80004 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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_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_prog_run_array include/linux/bpf.h:2104 [inline] trace_call_bpf+0x369/0x8a0 kernel/trace/bpf_trace.c:147 perf_trace_run_bpf_submit+0x7c/0x1d0 kernel/events/core.c:10269 perf_trace_lock+0x388/0x490 include/trace/events/lock.h:50 trace_lock_release include/trace/events/lock.h:69 [inline] lock_release+0x986/0x9f0 kernel/locking/lockdep.c:5765 seqcount_lockdep_reader_access+0x10f/0x220 include/linux/seqlock.h:71 ktime_get_update_offsets_now+0x3c/0x250 kernel/time/timekeeping.c:2320 hrtimer_update_base kernel/time/hrtimer.c:634 [inline] hrtimer_interrupt+0x133/0x990 kernel/time/hrtimer.c:1795 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline] __sysvec_apic_timer_interrupt+0x110/0x3f0 arch/x86/kernel/apic/apic.c:1049 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:finish_task_switch+0x1ea/0x870 kernel/sched/core.c:5282 Code: c9 50 e8 99 c9 0b 00 48 83 c4 08 4c 89 f7 e8 cd 38 00 00 0f 1f 44 00 00 4c 89 f7 e8 f0 46 2a 0a e8 bb f6 36 00 fb 48 8b 5d c0 <48> 8d bb f8 15 00 00 48 89 f8 48 c1 e8 03 49 be 00 00 00 00 00 fc RSP: 0018:ffffc900036d7988 EFLAGS: 00000282 RAX: aa82037c4fece200 RBX: ffff888024649e00 RCX: ffffffff947a0603 RDX: dffffc0000000000 RSI: ffffffff8bcab880 RDI: ffffffff8c1fe500 RBP: ffffc900036d79d0 R08: ffffffff8fad36af R09: 1ffffffff1f5a6d5 R10: dffffc0000000000 R11: fffffbfff1f5a6d6 R12: 1ffff110172a7ea7 R13: dffffc0000000000 R14: ffff8880b953e7c0 R15: ffff8880b953f538 context_switch kernel/sched/core.c:5411 [inline] __schedule+0x17f0/0x4a20 kernel/sched/core.c:6745 __schedule_loop kernel/sched/core.c:6822 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6837 do_nanosleep+0x197/0x600 kernel/time/hrtimer.c:2028 hrtimer_nanosleep+0x227/0x470 kernel/time/hrtimer.c:2081 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1396 [inline] __se_sys_clock_nanosleep+0x32b/0x3c0 kernel/time/posix-timers.c:1373 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:0x7f30ed6a82f5 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 b9 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f ba ff ff 48 8b 04 24 48 83 c4 28 f7 d8 RSP: 002b:00007ffc01687ea0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 00000000000001df RCX: 00007f30ed6a82f5 RDX: 00007ffc01687ee0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007ffc01687f6c R08: 0000000000000000 R09: 7fffffffffffffff R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032 R13: 0000000000025628 R14: 00000000000255a6 R15: 000000000000000c ---------------- Code disassembly (best guess): 0: c9 leave 1: 50 push %rax 2: e8 99 c9 0b 00 call 0xbc9a0 7: 48 83 c4 08 add $0x8,%rsp b: 4c 89 f7 mov %r14,%rdi e: e8 cd 38 00 00 call 0x38e0 13: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 18: 4c 89 f7 mov %r14,%rdi 1b: e8 f0 46 2a 0a call 0xa2a4710 20: e8 bb f6 36 00 call 0x36f6e0 25: fb sti 26: 48 8b 5d c0 mov -0x40(%rbp),%rbx * 2a: 48 8d bb f8 15 00 00 lea 0x15f8(%rbx),%rdi <-- trapping instruction 31: 48 89 f8 mov %rdi,%rax 34: 48 c1 e8 03 shr $0x3,%rax 38: 49 rex.WB 39: be 00 00 00 00 mov $0x0,%esi 3e: 00 fc add %bh,%ah