================================ WARNING: inconsistent lock state 6.8.0-syzkaller-05236-g443574b03387 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. init/1 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9538528 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538528 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x600 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x600 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:5497 [inline] lock_mm_and_find_vma+0x213/0x2f0 mm/memory.c:5557 do_user_addr_fault arch/x86/mm/fault.c:1385 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x1a9/0x890 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 strncpy_from_user+0x110/0x2f0 lib/strncpy_from_user.c:139 bpf_prog_load+0xd65/0x20f0 kernel/bpf/syscall.c:2836 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5631 __do_sys_bpf kernel/bpf/syscall.c:5738 [inline] __se_sys_bpf kernel/bpf/syscall.c:5736 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5736 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 irq event stamp: 1398517 hardirqs last enabled at (1398516): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (1398516): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (1398517): [] queue_work_on+0xfa/0x250 kernel/workqueue.c:2432 softirqs last enabled at (1398206): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last enabled at (1398206): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last enabled at (1398206): [] fpu_clone+0x25b/0xa80 arch/x86/kernel/fpu/core.c:630 softirqs last disabled at (1398513): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (1398513): [] __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 init/1: #0: ffffc90000a08c00 ((&sdp->delay_work)){+.-.}-{0:0}, at: call_timer_fn+0xc0/0x600 kernel/time/timer.c:1789 #1: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline] #1: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline] #1: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x198/0xec0 kernel/workqueue.c:2324 #2: ffff8880b943d8d8 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x6ec/0xec0 #3: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline] #3: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline] #3: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #3: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x14a/0x460 kernel/trace/bpf_trace.c:2421 #4: ffff88802b1181a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #4: ffff88802b1181a0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 1 Comm: init Not tainted 6.8.0-syzkaller-05236-g443574b03387 #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+0x1e7/0x2e0 lib/dump_stack.c:106 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4216 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 __lock_acquire+0xbcd/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x600 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+0xe5b/0xec0 kernel/workqueue.c:2382 queue_work_on+0x14f/0x250 kernel/workqueue.c:2435 call_timer_fn+0x17e/0x600 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers kernel/time/timer.c:2408 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2419 run_timer_base kernel/time/timer.c:2428 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2438 __do_softirq+0x2bc/0x943 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+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:check_kcov_mode kernel/kcov.c:184 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x37/0x70 kernel/kcov.c:207 Code: 80 ce 03 00 65 8b 15 00 de 6e 7e f7 c2 00 01 ff 00 74 11 f7 c2 00 01 00 00 74 35 83 b9 14 16 00 00 00 74 2c 8b 91 f0 15 00 00 <83> fa 02 75 21 48 8b 91 f8 15 00 00 48 8b 32 48 8d 7e 01 8b 89 f4 RSP: 0018:ffffc90000067a98 EFLAGS: 00000246 RAX: ffffffff81cf04f4 RBX: 0000000000000000 RCX: ffff8880162d0000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90000067b70 R08: ffffffff81cf04e0 R09: 1ffff11005161e85 R10: dffffc0000000000 R11: ffffed1005161e86 R12: 1ffffd400008a6c0 R13: dffffc0000000000 R14: 1ffffd400008a6c1 R15: ffffea0000453608 arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline] page_fixed_fake_head include/linux/page-flags.h:210 [inline] page_is_fake_head include/linux/page-flags.h:242 [inline] PageTail include/linux/page-flags.h:286 [inline] folio_flags include/linux/page-flags.h:313 [inline] folio_test_unevictable include/linux/page-flags.h:552 [inline] folio_inc_refs mm/swap.c:419 [inline] folio_mark_accessed+0x114/0x1ca0 mm/swap.c:461 shmem_file_read_iter+0x4b8/0xa50 mm/shmem.c:2834 call_read_iter include/linux/fs.h:2102 [inline] new_sync_read fs/read_write.c:395 [inline] vfs_read+0x97b/0xb70 fs/read_write.c:476 ksys_pread64 fs/read_write.c:671 [inline] __do_sys_pread64 fs/read_write.c:681 [inline] __se_sys_pread64 fs/read_write.c:678 [inline] __x64_sys_pread64+0x1aa/0x230 fs/read_write.c:678 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7f3e2e173513 Code: c8 ff c3 31 c0 0f 05 48 3d 00 f0 ff ff 76 10 48 8b 15 09 69 0d 00 f7 d8 64 89 02 48 83 c8 ff c3 49 89 ca b8 11 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 e6 68 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007fffa029bcb8 EFLAGS: 00000206 ORIG_RAX: 0000000000000011 RAX: ffffffffffffffda RBX: 000055d213ff9400 RCX: 00007f3e2e173513 RDX: 0000000000000180 RSI: 00007fffa029bcc0 RDI: 0000000000000003 RBP: 00007fffa029bcc0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 000055d213ff9400 R13: ffffffffffffff80 R14: 0000000000000002 R15: 00000000000011a9 ---------------- Code disassembly (best guess): 0: 80 ce 03 or $0x3,%dh 3: 00 65 8b add %ah,-0x75(%rbp) 6: 15 00 de 6e 7e adc $0x7e6ede00,%eax b: f7 c2 00 01 ff 00 test $0xff0100,%edx 11: 74 11 je 0x24 13: f7 c2 00 01 00 00 test $0x100,%edx 19: 74 35 je 0x50 1b: 83 b9 14 16 00 00 00 cmpl $0x0,0x1614(%rcx) 22: 74 2c je 0x50 24: 8b 91 f0 15 00 00 mov 0x15f0(%rcx),%edx * 2a: 83 fa 02 cmp $0x2,%edx <-- trapping instruction 2d: 75 21 jne 0x50 2f: 48 8b 91 f8 15 00 00 mov 0x15f8(%rcx),%rdx 36: 48 8b 32 mov (%rdx),%rsi 39: 48 8d 7e 01 lea 0x1(%rsi),%rdi 3d: 8b .byte 0x8b 3e: 89 f4 mov %esi,%esp