================================ WARNING: inconsistent lock state 6.9.0-rc6-syzkaller-00005-gb947cc5bf6d7 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.2/8693 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9438a80 (lock#12){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438a80 (lock#12){+.?.}-{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_write_lock_killable include/linux/mmap_lock.h:125 [inline] dup_mmap kernel/fork.c:638 [inline] dup_mm kernel/fork.c:1688 [inline] copy_mm kernel/fork.c:1737 [inline] copy_process+0x8b18/0x9090 kernel/fork.c:2390 kernel_clone+0xfd/0x980 kernel/fork.c:2797 __do_sys_clone+0xba/0x100 kernel/fork.c:2940 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 irq event stamp: 74199 hardirqs last enabled at (74198): [] __do_softirq+0x1d6/0x922 kernel/softirq.c:538 hardirqs last disabled at (74199): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (74199): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (73950): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (73950): [] __do_softirq+0x5da/0x922 kernel/softirq.c:583 softirqs last disabled at (74197): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (74197): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (74197): [] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#12); lock(lock#12); *** DEADLOCK *** 8 locks held by syz-executor.2/8693: #0: ffff88807c7f20e0 (&type->s_umount_key#86/1){+.+.}-{3:3}, at: alloc_super+0x23d/0xbd0 fs/super.c:343 #1: ffffffff8d6545b0 (cpu_hotplug_lock){++++}-{0:0}, at: alloc_and_link_pwqs kernel/workqueue.c:5366 [inline] #1: ffffffff8d6545b0 (cpu_hotplug_lock){++++}-{0:0}, at: alloc_workqueue+0x11a5/0x1c90 kernel/workqueue.c:5592 #2: ffffffff8d66aac8 (wq_pool_mutex){+.+.}-{3:3}, at: apply_workqueue_attrs kernel/workqueue.c:5248 [inline] #2: ffffffff8d66aac8 (wq_pool_mutex){+.+.}-{3:3}, at: alloc_and_link_pwqs kernel/workqueue.c:5377 [inline] #2: ffffffff8d66aac8 (wq_pool_mutex){+.+.}-{3:3}, at: alloc_workqueue+0x1480/0x1c90 kernel/workqueue.c:5592 #3: ffffc90000007cb0 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0x11a/0x610 kernel/time/timer.c:1790 #4: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #4: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #4: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xf2/0x1020 kernel/workqueue.c:2324 #5: ffff8880150a0018 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x39e/0x1020 kernel/workqueue.c:2360 #6: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #6: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #6: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #6: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf8/0x440 kernel/trace/bpf_trace.c:2421 #7: ffff88807b8ca7a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #7: ffff88807b8ca7a0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 8693 Comm: syz-executor.2 Not tainted 6.9.0-rc6-syzkaller-00005-gb947cc5bf6d7 #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:2382 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:__sanitizer_cov_trace_pc+0x45/0x60 kernel/kcov.c:212 Code: 24 74 0f f6 c4 01 74 35 8b 82 14 16 00 00 85 c0 74 2b 8b 82 f0 15 00 00 83 f8 02 75 20 48 8b 8a f8 15 00 00 8b 92 f4 15 00 00 <48> 8b 01 48 83 c0 01 48 39 d0 73 07 48 89 01 48 89 34 c1 c3 cc cc RSP: 0018:ffffc9000314f658 EFLAGS: 00000246 RAX: 0000000000000002 RBX: 00000000010c6ad2 RCX: ffffc900125bb000 RDX: 0000000000040000 RSI: ffffffff81575977 RDI: ffff88802c42aa10 RBP: 0000000000000008 R08: 0000000000000005 R09: 000000000000000c R10: 0000000000000008 R11: 0000000000000004 R12: 00000000dfba29c9 R13: ffff88802c42aa10 R14: 0000000000000008 R15: 0000000000000003 jhash+0x27/0x620 include/linux/jhash.h:71 wqattrs_hash kernel/workqueue.c:4530 [inline] get_unbound_pool kernel/workqueue.c:4852 [inline] alloc_unbound_pwq+0x13b/0xd10 kernel/workqueue.c:5009 apply_wqattrs_prepare+0x3be/0xb70 kernel/workqueue.c:5137 apply_workqueue_attrs_locked+0x64/0xe0 kernel/workqueue.c:5213 apply_workqueue_attrs kernel/workqueue.c:5249 [inline] alloc_and_link_pwqs kernel/workqueue.c:5377 [inline] alloc_workqueue+0x148f/0x1c90 kernel/workqueue.c:5592 btrfs_init_workqueues fs/btrfs/disk-io.c:2001 [inline] open_ctree+0x15c9/0x52f0 fs/btrfs/disk-io.c:3354 btrfs_fill_super fs/btrfs/super.c:938 [inline] btrfs_get_tree_super fs/btrfs/super.c:1858 [inline] btrfs_get_tree+0x11e9/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:0x7f062967f5aa 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:00007f062a4a2ef8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f062a4a2f80 RCX: 00007f062967f5aa RDX: 00000000200055c0 RSI: 0000000020005600 RDI: 00007f062a4a2f40 RBP: 00000000200055c0 R08: 00007f062a4a2f80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020005600 R13: 00007f062a4a2f40 R14: 000000000000559d R15: 0000000020000040 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 74 0f je 0x11 2: f6 c4 01 test $0x1,%ah 5: 74 35 je 0x3c 7: 8b 82 14 16 00 00 mov 0x1614(%rdx),%eax d: 85 c0 test %eax,%eax f: 74 2b je 0x3c 11: 8b 82 f0 15 00 00 mov 0x15f0(%rdx),%eax 17: 83 f8 02 cmp $0x2,%eax 1a: 75 20 jne 0x3c 1c: 48 8b 8a f8 15 00 00 mov 0x15f8(%rdx),%rcx 23: 8b 92 f4 15 00 00 mov 0x15f4(%rdx),%edx * 29: 48 8b 01 mov (%rcx),%rax <-- trapping instruction 2c: 48 83 c0 01 add $0x1,%rax 30: 48 39 d0 cmp %rdx,%rax 33: 73 07 jae 0x3c 35: 48 89 01 mov %rax,(%rcx) 38: 48 89 34 c1 mov %rsi,(%rcx,%rax,8) 3c: c3 ret 3d: cc int3 3e: cc int3