================================ WARNING: inconsistent lock state 6.9.0-rc6-syzkaller-00046-g18daea77cca6 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.4/5627 [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_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 rep_movs_alternative+0x30/0x70 arch/x86/lib/copy_user_64.S:50 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:125 [inline] _copy_from_user+0xc6/0xf0 lib/usercopy.c:23 copy_from_user include/linux/uaccess.h:183 [inline] copy_msghdr_from_user+0x99/0x160 net/socket.c:2514 recvmsg_copy_msghdr net/socket.c:2769 [inline] ___sys_recvmsg+0xdc/0x1a0 net/socket.c:2841 do_recvmmsg+0x2ba/0x750 net/socket.c:2939 __sys_recvmmsg net/socket.c:3018 [inline] __do_sys_recvmmsg net/socket.c:3041 [inline] __se_sys_recvmmsg net/socket.c:3034 [inline] __x64_sys_recvmmsg+0x239/0x290 net/socket.c:3034 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: 23709 hardirqs last enabled at (23708): [] __do_softirq+0x1d6/0x922 kernel/softirq.c:538 hardirqs last disabled at (23709): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (23709): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (22336): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (22336): [] __do_softirq+0x5da/0x922 kernel/softirq.c:583 softirqs last disabled at (23707): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (23707): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (23707): [] 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 *** 6 locks held by syz-executor.4/5627: #0: ffff88805f3cd128 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:850 [inline] #0: ffff88805f3cd128 (mapping.invalidate_lock#3){.+.+}-{3:3}, at: page_cache_ra_unbounded+0x133/0x5a0 mm/readahead.c:225 #1: ffffc90000a08cb0 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0x11a/0x610 kernel/time/timer.c:1790 #2: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #2: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #2: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xf2/0x1020 kernel/workqueue.c:2337 #3: ffff8880150a0018 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x39e/0x1020 kernel/workqueue.c:2373 #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: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #4: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf8/0x440 kernel/trace/bpf_trace.c:2421 #5: ffff8880223b6a20 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #5: ffff8880223b6a20 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5627 Comm: syz-executor.4 Not tainted 6.9.0-rc6-syzkaller-00046-g18daea77cca6 #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:write_comp_data+0x34/0x90 kernel/kcov.c:236 Code: 48 8b 15 1f 18 76 7e 65 8b 05 20 18 76 7e a9 00 01 ff 00 74 0f f6 c4 01 74 59 8b 82 14 16 00 00 85 c0 74 4f 8b 82 f0 15 00 00 <83> f8 03 75 44 48 8b 82 f8 15 00 00 8b 92 f4 15 00 00 48 8b 38 48 RSP: 0018:ffffc90004336d60 EFLAGS: 00000246 RAX: 0000000000000002 RBX: 0000000080000000 RCX: ffffffff813d28cf RDX: ffff88807cc7da00 RSI: 0000000000000000 RDI: 0000000000000005 RBP: ffffc900043370e8 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: dffffc0000000000 R12: ffffc90004330000 R13: ffffc90004338000 R14: ffffc900043370f0 R15: ffffc90004337028 unwind_next_frame+0x11ff/0x23a0 arch/x86/kernel/unwind_orc.c:672 arch_stack_walk+0x100/0x170 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x95/0xd0 kernel/stacktrace.c:122 save_stack+0x162/0x1f0 mm/page_owner.c:156 __set_page_owner+0x8a/0x560 mm/page_owner.c:325 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3317 __alloc_pages+0x22b/0x2460 mm/page_alloc.c:4575 alloc_pages_mpol+0x275/0x610 mm/mempolicy.c:2264 folio_alloc+0x1e/0x40 mm/mempolicy.c:2342 filemap_alloc_folio+0x3ba/0x490 mm/filemap.c:984 page_cache_ra_unbounded+0x1a5/0x5a0 mm/readahead.c:247 do_page_cache_ra mm/readahead.c:299 [inline] page_cache_ra_order+0x64b/0x9a0 mm/readahead.c:539 ondemand_readahead+0x520/0x1140 mm/readahead.c:661 page_cache_async_ra mm/readahead.c:710 [inline] page_cache_async_ra+0x123/0x150 mm/readahead.c:692 do_async_mmap_readahead mm/filemap.c:3179 [inline] filemap_fault+0xd3d/0x38c0 mm/filemap.c:3275 __do_fault+0x10a/0x490 mm/memory.c:4531 do_read_fault mm/memory.c:4894 [inline] do_fault mm/memory.c:5024 [inline] do_pte_missing mm/memory.c:3880 [inline] handle_pte_fault mm/memory.c:5300 [inline] __handle_mm_fault+0x371d/0x4a80 mm/memory.c:5441 handle_mm_fault+0x476/0xa00 mm/memory.c:5606 faultin_page mm/gup.c:958 [inline] __get_user_pages+0x4cc/0x1510 mm/gup.c:1257 populate_vma_page_range+0x2dd/0x420 mm/gup.c:1697 __mm_populate+0x1d6/0x380 mm/gup.c:1800 mm_populate include/linux/mm.h:3413 [inline] vm_mmap_pgoff+0x2d0/0x3c0 mm/util.c:578 ksys_mmap_pgoff+0x425/0x5b0 mm/mmap.c:1431 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:79 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:79 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:0x7f51b407dea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f51b4d810c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f51b41abf80 RCX: 00007f51b407dea9 RDX: 00000000027fffff RSI: 0000000000600000 RDI: 0000000020000000 RBP: 00007f51b40ca4a4 R08: 0000000000000004 R09: 0000000000000000 R10: 0000000004002011 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f51b41abf80 R15: 00007ffc213828b8 ---------------- Code disassembly (best guess): 0: 48 8b 15 1f 18 76 7e mov 0x7e76181f(%rip),%rdx # 0x7e761826 7: 65 8b 05 20 18 76 7e mov %gs:0x7e761820(%rip),%eax # 0x7e76182e e: a9 00 01 ff 00 test $0xff0100,%eax 13: 74 0f je 0x24 15: f6 c4 01 test $0x1,%ah 18: 74 59 je 0x73 1a: 8b 82 14 16 00 00 mov 0x1614(%rdx),%eax 20: 85 c0 test %eax,%eax 22: 74 4f je 0x73 24: 8b 82 f0 15 00 00 mov 0x15f0(%rdx),%eax * 2a: 83 f8 03 cmp $0x3,%eax <-- trapping instruction 2d: 75 44 jne 0x73 2f: 48 8b 82 f8 15 00 00 mov 0x15f8(%rdx),%rax 36: 8b 92 f4 15 00 00 mov 0x15f4(%rdx),%edx 3c: 48 8b 38 mov (%rax),%rdi 3f: 48 rex.W