================================ WARNING: inconsistent lock state 6.9.0-rc6-syzkaller-00042-g50dffbf77180 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.3/8742 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9438a80 (lock#13){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438a80 (lock#13){+.?.}-{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 __put_user_8+0x11/0x20 arch/x86/lib/putuser.S:105 clear_rseq_cs kernel/rseq.c:257 [inline] rseq_ip_fixup kernel/rseq.c:291 [inline] __rseq_handle_notify_resume+0x4ac/0x1090 kernel/rseq.c:329 rseq_handle_notify_resume include/linux/rseq.h:38 [inline] resume_user_mode_work include/linux/resume_user_mode.h:62 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [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+0x19d/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: 2707 hardirqs last enabled at (2706): [] __do_softirq+0x1d6/0x922 kernel/softirq.c:538 hardirqs last disabled at (2707): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (2707): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (182): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (182): [] bpf_map_alloc_id kernel/bpf/syscall.c:359 [inline] softirqs last enabled at (182): [] map_create+0x9d0/0x1c30 kernel/bpf/syscall.c:1377 softirqs last disabled at (2705): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (2705): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (2705): [] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#13); lock(lock#13); *** DEADLOCK *** 8 locks held by syz-executor.3/8742: #0: ffff88801dc24420 (sb_writers#5){.+.+}-{0:0}, at: filename_create+0x10d/0x530 fs/namei.c:3885 #1: ffff88805c2ede00 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:830 [inline] #1: ffff88805c2ede00 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: filename_create+0x1c2/0x530 fs/namei.c:3892 #2: ffff88801dc28950 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x10db/0x15e0 fs/jbd2/transaction.c:463 #3: ffffc90000007cb0 (&(&nsim_dev->trap_data->trap_report_dw)->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:2337 #5: ffff8880b943d998 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x39e/0x1020 kernel/workqueue.c:2373 #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: ffff88807df201a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #7: ffff88807df201a0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 8742 Comm: syz-executor.3 Not tainted 6.9.0-rc6-syzkaller-00042-g50dffbf77180 #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:unwind_next_frame+0x172/0x23a0 arch/x86/kernel/unwind_orc.c:494 Code: 00 00 e8 11 ae 50 00 4c 8d 7b 35 48 b8 00 00 00 00 00 fc ff df 4c 89 fa 48 c1 ea 03 0f b6 04 02 4c 89 fa 83 e2 07 38 d0 7f 08 <84> c0 0f 85 dd 0b 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 14 24 RSP: 0018:ffffc900033475e0 EFLAGS: 00000293 RAX: 0000000000000000 RBX: ffffc90003347660 RCX: ffffc90004254000 RDX: 0000000000000005 RSI: ffffffff813d181f RDI: ffff8880173650c0 RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000003 R12: 0000000000000000 R13: ffffffff81798dd0 R14: ffffc90003347720 R15: ffffc90003347695 arch_stack_walk+0x100/0x170 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x95/0xd0 kernel/stacktrace.c:122 kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:240 [inline] __kasan_slab_free+0x11d/0x1a0 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x129/0x390 mm/slub.c:4390 security_inode_init_security+0x274/0x380 security/security.c:1747 __ext4_new_inode+0x425b/0x51e0 fs/ext4/ialloc.c:1326 ext4_mkdir+0x283/0xb70 fs/ext4/namei.c:3013 vfs_mkdir+0x57d/0x820 fs/namei.c:4123 do_mkdirat+0x301/0x3a0 fs/namei.c:4146 __do_sys_mkdirat fs/namei.c:4161 [inline] __se_sys_mkdirat fs/namei.c:4159 [inline] __x64_sys_mkdirat+0x114/0x170 fs/namei.c:4159 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:0x7f232747c9a7 Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 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:00007f23282c1ef8 EFLAGS: 00000202 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f23282c1f80 RCX: 00007f232747c9a7 RDX: 00000000000001ff RSI: 0000000020000000 RDI: 00000000ffffff9c RBP: 0000000020002900 R08: 0000000000000000 R09: 0000000000000582 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000 R13: 00007f23282c1f40 R14: 0000000000000588 R15: 0000000020000740 ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: e8 11 ae 50 00 call 0x50ae18 7: 4c 8d 7b 35 lea 0x35(%rbx),%r15 b: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 12: fc ff df 15: 4c 89 fa mov %r15,%rdx 18: 48 c1 ea 03 shr $0x3,%rdx 1c: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax 20: 4c 89 fa mov %r15,%rdx 23: 83 e2 07 and $0x7,%edx 26: 38 d0 cmp %dl,%al 28: 7f 08 jg 0x32 * 2a: 84 c0 test %al,%al <-- trapping instruction 2c: 0f 85 dd 0b 00 00 jne 0xc0f 32: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 39: fc ff df 3c: 48 8b 14 24 mov (%rsp),%rdx