================================ WARNING: inconsistent lock state 6.9.0-rc6-syzkaller-00053-g0106679839f7 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.1/16356 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9538a80 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538a80 (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_lock include/linux/mmap_lock.h:147 [inline] exit_mm kernel/exit.c:545 [inline] do_exit+0xee4/0x2c10 kernel/exit.c:865 do_group_exit+0xd3/0x2a0 kernel/exit.c:1027 get_signal+0x2616/0x2710 kernel/signal.c:2911 arch_do_signal_or_restart+0x90/0x7e0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x14a/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xdc/0x260 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 76691 hardirqs last enabled at (76690): [] __do_softirq+0x1d6/0x922 kernel/softirq.c:538 hardirqs last disabled at (76691): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (76691): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (75984): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (75984): [] __do_softirq+0x5da/0x922 kernel/softirq.c:583 softirqs last disabled at (76689): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (76689): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (76689): [] 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 *** 9 locks held by syz-executor.1/16356: #0: ffffffff8df56bc8 (uuid_mutex){+.+.}-{3:3}, at: btrfs_get_tree_super fs/btrfs/super.c:1805 [inline] #0: ffffffff8df56bc8 (uuid_mutex){+.+.}-{3:3}, at: btrfs_get_tree+0x3b9/0x1b90 fs/btrfs/super.c:2084 #1: ffff888028f984d8 (&fs_devs->device_list_mutex){+.+.}-{3:3}, at: device_list_add.constprop.0+0xdf3/0x1a70 fs/btrfs/volumes.c:785 #2: ffffffff8d79e720 (console_lock){+.+.}-{0:0}, at: vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45 #3: ffffffff8d79e790 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:334 [inline] #3: ffffffff8d79e790 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:232 [inline] #3: ffffffff8d79e790 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:286 [inline] #3: ffffffff8d79e790 (console_srcu){....}-{0:0}, at: console_flush_all+0x12d/0xd70 kernel/printk/printk.c:2971 #4: ffffc90000a08cb0 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0x11a/0x610 kernel/time/timer.c:1790 #5: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #5: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #5: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xf2/0x1020 kernel/workqueue.c:2337 #6: ffff8880150a0018 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x39e/0x1020 kernel/workqueue.c:2373 #7: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #7: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #7: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #7: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf8/0x440 kernel/trace/bpf_trace.c:2421 #8: ffff888048c63aa0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #8: ffff888048c63aa0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 16356 Comm: syz-executor.1 Not tainted 6.9.0-rc6-syzkaller-00053-g0106679839f7 #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:console_flush_all+0xa19/0xd70 kernel/printk/printk.c:2985 Code: e8 ec 19 26 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 2a fa 1e 00 48 85 db 0f 85 8b 01 00 00 e8 0c ff 1e 00 fb 48 8b 04 24 <4c> 89 fa 83 e2 07 0f b6 00 38 d0 7f 08 84 c0 0f 85 a9 02 00 00 41 RSP: 0018:ffffc900035575f0 EFLAGS: 00000287 RAX: fffff520006aaee5 RBX: 0000000000000000 RCX: ffffc90012a01000 RDX: 0000000000040000 RSI: ffffffff816ec724 RDI: 0000000000000007 RBP: dffffc0000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000005 R12: 0000000000000200 R13: ffffffff8e3b3838 R14: ffffffff8e3b37e0 R15: ffffc90003557728 console_unlock+0xae/0x290 kernel/printk/printk.c:3048 vprintk_emit kernel/printk/printk.c:2348 [inline] vprintk_emit+0x11a/0x5a0 kernel/printk/printk.c:2303 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2373 device_list_add.constprop.0+0x12c5/0x1a70 fs/btrfs/volumes.c:844 btrfs_scan_one_device+0x3ba/0x6e0 fs/btrfs/volumes.c:1432 btrfs_get_tree_super fs/btrfs/super.c:1811 [inline] btrfs_get_tree+0x3ee/0x1b90 fs/btrfs/super.c:2084 vfs_get_tree+0x8f/0x380 fs/super.c:1779 fc_mount+0x16/0xc0 fs/namespace.c:1125 btrfs_get_tree_subvol fs/btrfs/super.c:2047 [inline] btrfs_get_tree+0xa53/0x1b90 fs/btrfs/super.c:2085 vfs_get_tree+0x8f/0x380 fs/super.c:1779 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x297/0x320 fs/namespace.c:3875 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:0x7f323607f5aa Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f3236e11ef8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f3236e11f80 RCX: 00007f323607f5aa RDX: 0000000020000000 RSI: 0000000020005600 RDI: 00007f3236e11f40 RBP: 0000000020000000 R08: 00007f3236e11f80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020005600 R13: 00007f3236e11f40 R14: 000000000000559d R15: 0000000020000080 ---------------- Code disassembly (best guess): 0: e8 ec 19 26 00 call 0x2619f1 5: 9c pushf 6: 5b pop %rbx 7: 81 e3 00 02 00 00 and $0x200,%ebx d: 31 ff xor %edi,%edi f: 48 89 de mov %rbx,%rsi 12: e8 2a fa 1e 00 call 0x1efa41 17: 48 85 db test %rbx,%rbx 1a: 0f 85 8b 01 00 00 jne 0x1ab 20: e8 0c ff 1e 00 call 0x1eff31 25: fb sti 26: 48 8b 04 24 mov (%rsp),%rax * 2a: 4c 89 fa mov %r15,%rdx <-- trapping instruction 2d: 83 e2 07 and $0x7,%edx 30: 0f b6 00 movzbl (%rax),%eax 33: 38 d0 cmp %dl,%al 35: 7f 08 jg 0x3f 37: 84 c0 test %al,%al 39: 0f 85 a9 02 00 00 jne 0x2e8 3f: 41 rex.B