================================ WARNING: inconsistent lock state 6.9.0-syzkaller-12123-g531876c80004 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.1/7310 [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_write_unlock include/linux/mmap_lock.h:129 [inline] vm_mmap_pgoff+0x3c2/0x3d0 mm/util.c:575 ksys_mmap_pgoff+0x4f1/0x720 mm/mmap.c:1433 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: 982 hardirqs last enabled at (981): [<ffffffff8b8606e3>] irqentry_exit+0x63/0x90 kernel/entry/common.c:357 hardirqs last disabled at (982): [<ffffffff8b85e2ae>] sysvec_apic_timer_interrupt+0xe/0xc0 arch/x86/kernel/apic/apic.c:1043 softirqs last enabled at (928): [<ffffffff81a6e5a1>] bpf_prog_load+0x1881/0x20f0 kernel/bpf/syscall.c:2934 softirqs last disabled at (926): [<ffffffff81a4b5e0>] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (926): [<ffffffff81a4b5e0>] bpf_ksym_add+0x30/0x370 kernel/bpf/core.c:660 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); <Interrupt> lock(lock#10); *** DEADLOCK *** 4 locks held by syz-executor.1/7310: #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: ffff8880115ccd98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #3: ffff8880115ccd98 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 7310 Comm: syz-executor.1 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: <IRQ> __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 </IRQ> <TASK> asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd8/0x140 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 8e fa 6a f6 f6 44 24 21 02 75 52 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 <e8> a3 b7 d4 f5 65 8b 05 34 02 73 74 85 c0 74 43 48 c7 04 24 0e 36 RSP: 0018:ffffc9001479f9c0 EFLAGS: 00000206 RAX: e23b16ad01ed4e00 RBX: 1ffff920028f3f3c RCX: ffffffff947a0603 RDX: dffffc0000000000 RSI: ffffffff8bcab880 RDI: 0000000000000001 RBP: ffffc9001479fa50 R08: ffffffff8fad36af R09: 1ffffffff1f5a6d5 R10: dffffc0000000000 R11: fffffbfff1f5a6d6 R12: dffffc0000000000 R13: 1ffff920028f3f38 R14: ffffc9001479f9e0 R15: 0000000000000246 class_raw_spinlock_irqsave_destructor include/linux/spinlock.h:553 [inline] try_to_wake_up+0x8fb/0x1470 kernel/sched/core.c:4262 wake_up_process kernel/sched/core.c:4510 [inline] wake_up_q+0xc8/0x120 kernel/sched/core.c:1029 futex_wake+0x523/0x5c0 kernel/futex/waitwake.c:199 do_futex+0x392/0x560 kernel/futex/syscalls.c:107 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x3f9/0x480 kernel/futex/syscalls.c:160 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:0x7f5c8507cee9 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:00007f5c85df2178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f5c851b3fa8 RCX: 00007f5c8507cee9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f5c851b3fac RBP: 00007f5c851b3fa0 R08: 7fffffffffffffff R09: 00007f5c85df26c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5c851b3fac R13: 000000000000000b R14: 00007ffcc9f93c70 R15: 00007ffcc9f93d58 </TASK> ---------------- Code disassembly (best guess): 0: 9c pushf 1: 8f 44 24 20 pop 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 8e fa 6a f6 call 0xf66afaa2 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 52 jne 0x6d 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 a3 b7 d4 f5 call 0xf5d4b7d2 <-- trapping instruction 2f: 65 8b 05 34 02 73 74 mov %gs:0x74730234(%rip),%eax # 0x7473026a 36: 85 c0 test %eax,%eax 38: 74 43 je 0x7d 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss