================================ WARNING: inconsistent lock state 6.9.0-rc6-syzkaller-00046-g18daea77cca6 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.0/12120 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9438a80 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438a80 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x7f/0x790 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 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:166 [inline] get_mmap_lock_carefully mm/memory.c:5633 [inline] lock_mm_and_find_vma+0xeb/0x580 mm/memory.c:5693 do_user_addr_fault+0x29c/0x1080 arch/x86/mm/fault.c:1385 handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 irq event stamp: 3319 hardirqs last enabled at (3318): [] __do_softirq+0x1d6/0x922 kernel/softirq.c:538 hardirqs last disabled at (3319): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (3319): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (3296): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (3296): [] __do_softirq+0x5da/0x922 kernel/softirq.c:583 softirqs last disabled at (3317): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (3317): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (3317): [] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 5 locks held by syz-executor.0/12120: #0: ffffc90000007cb0 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0x11a/0x610 kernel/time/timer.c:1790 #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xf2/0x1020 kernel/workqueue.c:2337 #2: ffff8880150a0018 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x39e/0x1020 kernel/workqueue.c:2373 #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf8/0x440 kernel/trace/bpf_trace.c:2421 #4: ffff88807ca1d720 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #4: ffff88807ca1d720 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 12120 Comm: syz-executor.0 Not tainted 6.9.0-rc6-syzkaller-00046-g18daea77cca6 #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+0x116/0x1f0 lib/dump_stack.c:114 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4216 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4567 [inline] __lock_acquire+0x13d4/0x3b30 kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 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:166 [inline] stack_map_get_build_id_offset+0x5df/0x7d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x6bf/0x700 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1985 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1975 ___bpf_prog_run+0x3e51/0xabd0 kernel/bpf/core.c:1997 __bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2236 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline] __bpf_prog_run include/linux/filter.h:657 [inline] bpf_prog_run include/linux/filter.h:664 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline] bpf_trace_run3+0x167/0x440 kernel/trace/bpf_trace.c:2421 __bpf_trace_workqueue_queue_work+0x101/0x140 include/trace/events/workqueue.h:23 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0x627/0x1020 kernel/workqueue.c:2395 call_timer_fn+0x1a0/0x610 kernel/time/timer.c:1793 expire_timers kernel/time/timer.c:1839 [inline] __run_timers+0x567/0xaf0 kernel/time/timer.c:2418 __run_timer_base kernel/time/timer.c:2429 [inline] __run_timer_base kernel/time/timer.c:2422 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2438 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2448 __do_softirq+0x218/0x922 kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:633 [inline] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:vsnprintf+0x3a3/0x1880 lib/vsprintf.c:2903 Code: 31 ff 44 89 ee e8 9d a0 bf f6 45 84 ed 0f 85 9f fd ff ff eb 10 41 80 ff 06 0f 84 33 07 00 00 41 80 ff 07 75 75 e8 fd a5 bf f6 <8b> 44 24 18 89 eb 29 c3 e8 f0 a5 bf f6 4c 8b 74 24 20 31 ff 4c 89 RSP: 0018:ffffc9000354f820 EFLAGS: 00000293 RAX: 0000000000000000 RBX: ffffffff8b0d8405 RCX: ffffffff8ace2013 RDX: ffff8880618ebc00 RSI: ffffffff8ace2033 RDI: 0000000000000001 RBP: ffffc9000354fab1 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000035373854 R12: ffffffff8b0d8405 R13: 0000000000000000 R14: ffffc9000354f908 R15: 000000007ffffff8 sprintf+0xcd/0x110 lib/vsprintf.c:3028 print_caller kernel/printk/printk.c:1341 [inline] info_print_prefix+0x147/0x350 kernel/printk/printk.c:1358 get_record_print_text_size+0x9c/0x120 kernel/printk/printk.c:1493 find_first_fitting_seq+0x197/0x230 kernel/printk/printk.c:1541 syslog_print_all+0x195/0x3f0 kernel/printk/printk.c:1670 do_syslog+0x316/0x6a0 kernel/printk/printk.c:1748 __do_sys_syslog kernel/printk/printk.c:1826 [inline] __se_sys_syslog kernel/printk/printk.c:1824 [inline] __x64_sys_syslog+0x74/0xb0 kernel/printk/printk.c:1824 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff76867dea9 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:00007ffcf5bbf728 EFLAGS: 00000246 ORIG_RAX: 0000000000000067 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff76867dea9 RDX: 000000000000003f RSI: 00007ffcf5bbf800 RDI: 0000000000000003 RBP: 00007ffcf5bbf800 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcf5bbfde8 R13: 00007ffcf5bbfde8 R14: 0000000000000001 R15: 00000000fffffff1 ---------------- Code disassembly (best guess): 0: 31 ff xor %edi,%edi 2: 44 89 ee mov %r13d,%esi 5: e8 9d a0 bf f6 call 0xf6bfa0a7 a: 45 84 ed test %r13b,%r13b d: 0f 85 9f fd ff ff jne 0xfffffdb2 13: eb 10 jmp 0x25 15: 41 80 ff 06 cmp $0x6,%r15b 19: 0f 84 33 07 00 00 je 0x752 1f: 41 80 ff 07 cmp $0x7,%r15b 23: 75 75 jne 0x9a 25: e8 fd a5 bf f6 call 0xf6bfa627 * 2a: 8b 44 24 18 mov 0x18(%rsp),%eax <-- trapping instruction 2e: 89 eb mov %ebp,%ebx 30: 29 c3 sub %eax,%ebx 32: e8 f0 a5 bf f6 call 0xf6bfa627 37: 4c 8b 74 24 20 mov 0x20(%rsp),%r14 3c: 31 ff xor %edi,%edi 3e: 4c rex.WR 3f: 89 .byte 0x89