================================ WARNING: inconsistent lock state 5.15.163-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. sed/4044 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9b35bb8 (lock#9){+.?.}-{2:2}, at: local_lock_acquire+0xd/0x170 include/linux/local_lock_internal.h:28 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 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:88 [inline] vm_mmap_pgoff+0x2b0/0x2d0 mm/util.c:549 ksys_mmap_pgoff+0x559/0x780 mm/mmap.c:1624 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 irq event stamp: 5219 hardirqs last enabled at (5218): [] handle_softirqs+0x1d1/0x930 kernel/softirq.c:542 hardirqs last disabled at (5219): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (5219): [] _raw_spin_lock_irq+0xa9/0x110 kernel/locking/spinlock.c:170 softirqs last enabled at (1584): [] local_bh_enable+0x5/0x20 include/linux/bottom_half.h:31 softirqs last disabled at (5217): [] __do_softirq kernel/softirq.c:592 [inline] softirqs last disabled at (5217): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (5217): [] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:641 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#9); lock(lock#9); *** DEADLOCK *** 5 locks held by sed/4044: #0: ffffc90000dd0be0 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:45 [inline] #0: ffffc90000dd0be0 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0xbe/0x560 kernel/time/timer.c:1441 #1: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #2: ffff888011c79818 (&pool->lock/1){..-.}-{2:2}, at: __queue_work+0x56d/0xd00 #3: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #4: ffff88807e235c28 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #4: ffff88807e235c28 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x23e/0x930 kernel/bpf/stackmap.c:185 stack backtrace: CPU: 1 PID: 4044 Comm: sed Not tainted 5.15.163-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 valid_state+0x134/0x1c0 kernel/locking/lockdep.c:3932 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4135 mark_lock+0x21a/0x340 kernel/locking/lockdep.c:4591 __lock_acquire+0xb9d/0x1ff0 kernel/locking/lockdep.c:4966 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 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:137 [inline] stack_map_get_build_id_offset+0x612/0x930 kernel/bpf/stackmap.c:185 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1490 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1480 bpf_prog_e6cf5f9c69743609+0x3a/0xb18 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0xc99/0xd00 kernel/workqueue.c:1512 call_timer_fn+0x16d/0x560 kernel/time/timer.c:1451 expire_timers kernel/time/timer.c:1491 [inline] __run_timers+0x6a8/0x890 kernel/time/timer.c:1767 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780 handle_softirqs+0x3a7/0x930 kernel/softirq.c:558 __do_softirq kernel/softirq.c:592 [inline] invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:641 irq_exit_rcu+0x5/0x20 kernel/softirq.c:653 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1096 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:vfs_statx+0x0/0x3b0 fs/stat.c:204 Code: cb 00 08 00 00 89 ef 4c 89 fe 89 da 4c 89 f1 41 b8 ff 07 00 00 5b 41 5e 41 5f 5d eb 0d 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <55> 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec c0 00 RSP: 0018:ffffc9000115fd98 EFLAGS: 00000202 RAX: ffffc9000115fde0 RBX: ffffc9000115fde0 RCX: ffffc9000115fde0 RDX: 0000000000001800 RSI: 00007f24fb009130 RDI: 0000000000000003 RBP: ffffc9000115ff20 R08: 00000000000007ff R09: ffffc9000115fde0 R10: 0000000000000006 R11: dffffc0000000001 R12: ffffc9000115fde0 R13: 00007f24fb009130 R14: 1ffff9200022bfb8 R15: dffffc0000000000 vfs_fstatat fs/stat.c:243 [inline] __do_sys_newfstatat fs/stat.c:411 [inline] __se_sys_newfstatat fs/stat.c:405 [inline] __x64_sys_newfstatat+0x12c/0x1b0 fs/stat.c:405 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f24faf6c5f4 Code: 64 c7 00 09 00 00 00 83 c8 ff c3 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 00 00 00 00 41 89 ca b8 06 01 00 00 0f 05 <45> 31 c0 3d 00 f0 ff ff 76 10 48 8b 15 03 a8 0d 00 f7 d8 41 83 c8 RSP: 002b:00007ffd9a385188 EFLAGS: 00000206 ORIG_RAX: 0000000000000106 RAX: ffffffffffffffda RBX: 00007f24fb044460 RCX: 00007f24faf6c5f4 RDX: 00007ffd9a385190 RSI: 00007f24fb009130 RDI: 0000000000000003 RBP: 00005610a36052a0 R08: 0000000000000000 R09: 00007f24fb047b70 R10: 0000000000001000 R11: 0000000000000206 R12: 00007ffd9a3852f0 R13: 00007ffd9a3852f0 R14: 000000000000000a R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: cb lret 1: 00 08 add %cl,(%rax) 3: 00 00 add %al,(%rax) 5: 89 ef mov %ebp,%edi 7: 4c 89 fe mov %r15,%rsi a: 89 da mov %ebx,%edx c: 4c 89 f1 mov %r14,%rcx f: 41 b8 ff 07 00 00 mov $0x7ff,%r8d 15: 5b pop %rbx 16: 41 5e pop %r14 18: 41 5f pop %r15 1a: 5d pop %rbp 1b: eb 0d jmp 0x2a 1d: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 24: 00 00 00 27: 0f 1f 00 nopl (%rax) * 2a: 55 push %rbp <-- trapping instruction 2b: 48 89 e5 mov %rsp,%rbp 2e: 41 57 push %r15 30: 41 56 push %r14 32: 41 55 push %r13 34: 41 54 push %r12 36: 53 push %rbx 37: 48 83 e4 e0 and $0xffffffffffffffe0,%rsp 3b: 48 rex.W 3c: 81 .byte 0x81 3d: ec in (%dx),%al 3e: c0 .byte 0xc0