================================ WARNING: inconsistent lock state 6.9.0-rc5-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. udevd/5399 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b95387a8 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b95387a8 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x620 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x540 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x620 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+0x213/0x2f0 mm/memory.c:5693 do_user_addr_fault arch/x86/mm/fault.c:1385 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x20b/0x8a0 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+0x666/0x14d0 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+0x113/0x360 kernel/entry/common.c:218 do_syscall_64+0x94/0x170 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x76/0x7e irq event stamp: 33155 hardirqs last enabled at (33154): [] __do_softirq+0x1d8/0x97c kernel/softirq.c:538 hardirqs last disabled at (33155): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (33155): [] _raw_spin_lock_irq+0xad/0x120 kernel/locking/spinlock.c:170 softirqs last enabled at (29382): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (29382): [] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 softirqs last disabled at (33153): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (33153): [] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 5 locks held by udevd/5399: #0: ffffc900001f0c00 (&(&nsim_dev->trap_data->trap_report_dw)->timer){..-.}-{0:0}, at: call_timer_fn+0xc0/0x630 kernel/time/timer.c:1790 #1: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x198/0xed0 kernel/workqueue.c:2324 #2: ffff8880b953ddd8 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x6ec/0xed0 #3: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #3: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x14a/0x460 kernel/trace/bpf_trace.c:2421 #4: ffff8880244f3920 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #4: ffff8880244f3920 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5399 Comm: udevd Not tainted 6.9.0-rc5-syzkaller #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+0x241/0x360 lib/dump_stack.c:114 valid_state+0x139/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xac/0xbb0 kernel/locking/lockdep.c:4216 mark_lock+0x21f/0x350 kernel/locking/lockdep.c:4678 __lock_acquire+0xd2a/0x7fa0 kernel/locking/lockdep.c:5091 lock_acquire+0x1ed/0x540 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x620 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+0x9b2/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1985 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1975 bpf_prog_e6cf5f9c69743609+0x42/0x46 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+0x238/0x460 kernel/trace/bpf_trace.c:2421 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0xe6a/0xed0 kernel/workqueue.c:2382 call_timer_fn+0x18e/0x630 kernel/time/timer.c:1793 expire_timers kernel/time/timer.c:1839 [inline] __run_timers kernel/time/timer.c:2418 [inline] __run_timer_base+0x695/0x8e0 kernel/time/timer.c:2429 run_timer_base kernel/time/timer.c:2438 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2448 __do_softirq+0x2cc/0x97c kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 irq_exit_rcu+0x9/0x30 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:arch_test_and_set_bit arch/x86/include/asm/bitops.h:137 [inline] RIP: 0010:test_and_set_bit include/asm-generic/bitops/instrumented-atomic.h:72 [inline] RIP: 0010:queue_work_on+0x1f8/0x250 kernel/workqueue.c:2434 Code: 11 e8 9c ed 35 00 4d 85 e4 75 16 e8 92 ed 35 00 eb 15 e8 8b ed 35 00 e8 56 c4 c5 09 4d 85 e4 74 ea e8 7c ed 35 00 fb 45 84 ed <0f> 94 c0 48 c7 44 24 20 0e 36 e0 45 48 b9 00 00 00 00 00 fc ff df RSP: 0018:ffffc9000494fd20 EFLAGS: 00000246 RAX: ffffffff815e1a74 RBX: 0000000000000000 RCX: ffff888024440000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000494fdf0 R08: ffffffff815e1a4a R09: 1ffffffff1e7efe5 R10: dffffc0000000000 R11: fffffbfff1e7efe6 R12: 0000000000000200 R13: 0000000000000000 R14: 0000000000000046 R15: 1ffff92000929fa8 queue_work include/linux/workqueue.h:605 [inline] fsnotify_put_mark+0x50f/0x710 fs/notify/mark.c:332 __do_sys_inotify_rm_watch fs/notify/inotify/inotify_user.c:819 [inline] __se_sys_inotify_rm_watch+0x16f/0x230 fs/notify/inotify/inotify_user.c:793 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x88/0x170 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fc4f2323f77 Code: 73 01 c3 48 8b 0d b1 ce 0c 00 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 ff 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 ce 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffd5d7b8b18 EFLAGS: 00000246 ORIG_RAX: 00000000000000ff RAX: ffffffffffffffda RBX: 00005645ace9c120 RCX: 00007fc4f2323f77 RDX: 0000000000000007 RSI: 000000000000000f RDI: 0000000000000007 RBP: 00005645de03a400 R08: 0000000000000006 R09: d1eef49c9dcf3eb8 R10: 0000000000000010 R11: 0000000000000246 R12: 000000000000000f R13: 00007ffd5d7b8b28 R14: 0000000003938700 R15: 00005645ace9c160 ---------------- Code disassembly (best guess): 0: 11 e8 adc %ebp,%eax 2: 9c pushf 3: ed in (%dx),%eax 4: 35 00 4d 85 e4 xor $0xe4854d00,%eax 9: 75 16 jne 0x21 b: e8 92 ed 35 00 call 0x35eda2 10: eb 15 jmp 0x27 12: e8 8b ed 35 00 call 0x35eda2 17: e8 56 c4 c5 09 call 0x9c5c472 1c: 4d 85 e4 test %r12,%r12 1f: 74 ea je 0xb 21: e8 7c ed 35 00 call 0x35eda2 26: fb sti 27: 45 84 ed test %r13b,%r13b * 2a: 0f 94 c0 sete %al <-- trapping instruction 2d: 48 c7 44 24 20 0e 36 movq $0x45e0360e,0x20(%rsp) 34: e0 45 36: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx 3d: fc ff df