================================ WARNING: inconsistent lock state 6.9.0-rc6-syzkaller-00046-g18daea77cca6 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.2/1926 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9438a80 (lock#11){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438a80 (lock#11){+.?.}-{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: 51407 hardirqs last enabled at (51406): [] __do_softirq+0x1d6/0x922 kernel/softirq.c:538 hardirqs last disabled at (51407): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (51407): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (49284): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (49284): [] __do_softirq+0x5da/0x922 kernel/softirq.c:583 softirqs last disabled at (51405): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (51405): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (51405): [] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#11); lock(lock#11); *** DEADLOCK *** 5 locks held by syz-executor.2/1926: #0: ffffc90000007cb0 (&(&flowtable->gc_work)->timer){..-.}-{0:0}, at: call_timer_fn+0x11a/0x610 kernel/time/timer.c:1790 #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xf2/0x1020 kernel/workqueue.c:2337 #2: ffff8880b943d998 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x39e/0x1020 kernel/workqueue.c:2373 #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf8/0x440 kernel/trace/bpf_trace.c:2421 #4: ffff88807f7ca7a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #4: ffff88807f7ca7a0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 1926 Comm: syz-executor.2 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:jhash2 include/linux/jhash.h:129 [inline] RIP: 0010:hash_stack lib/stackdepot.c:514 [inline] RIP: 0010:stack_depot_save_flags+0xbe/0x8f0 lib/stackdepot.c:614 Code: 01 df c1 c6 08 31 f0 29 c3 89 de 89 c3 01 f8 c1 c3 10 31 f3 89 de 29 df 01 c3 c1 ce 0d 31 f7 29 f8 89 c6 89 f8 01 df c1 c0 04 <31> f0 83 f9 03 77 9a 83 f9 02 0f 84 fa 00 00 00 83 f9 03 0f 84 ee RSP: 0018:ffffc90004a96750 EFLAGS: 00000287 RAX: 00000000061e55db RBX: 000000000b4b0031 RCX: 0000000000000005 RDX: ffffc90004a96864 RSI: 00000000e7ecb7ed RDI: 00000000bbace58e RBP: 0000000000000001 R08: 0000000000000007 R09: 00000000eb75ce05 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffffc90004a967b0 R14: 0000000000000019 R15: 0000000000000019 kasan_save_stack+0x42/0x60 mm/kasan/common.c:48 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] kmem_cache_free+0x12e/0x380 mm/slub.c:4344 free_buffer_head+0x4e/0x110 fs/buffer.c:3017 try_to_free_buffers+0x1c5/0x2d0 fs/buffer.c:2958 filemap_release_folio+0x215/0x280 mm/filemap.c:4133 shrink_folio_list+0x295a/0x3f00 mm/vmscan.c:1376 evict_folios+0x6e6/0x1bb0 mm/vmscan.c:4537 try_to_shrink_lruvec+0x618/0x9b0 mm/vmscan.c:4733 lru_gen_shrink_lruvec mm/vmscan.c:4876 [inline] shrink_lruvec+0x2df/0x29b0 mm/vmscan.c:5653 shrink_node_memcgs mm/vmscan.c:5873 [inline] shrink_node+0x81e/0x3a80 mm/vmscan.c:5908 shrink_zones mm/vmscan.c:6152 [inline] do_try_to_free_pages+0x361/0x1a20 mm/vmscan.c:6214 try_to_free_mem_cgroup_pages+0x317/0x7f0 mm/vmscan.c:6529 try_charge_memcg+0x3d1/0x11a0 mm/memcontrol.c:2783 obj_cgroup_charge_pages mm/memcontrol.c:3302 [inline] __memcg_kmem_charge_page+0xdb/0x2a0 mm/memcontrol.c:3328 __alloc_pages+0x25b/0x2460 mm/page_alloc.c:4592 alloc_pages_mpol+0x275/0x610 mm/mempolicy.c:2264 __get_free_pages+0xc/0x40 mm/page_alloc.c:4622 io_mem_alloc+0x33/0x60 io_uring/io_uring.c:2819 io_allocate_scq_urings io_uring/io_uring.c:3773 [inline] io_uring_create io_uring/io_uring.c:3956 [inline] io_uring_setup+0x1249/0x2350 io_uring/io_uring.c:4068 __do_sys_io_uring_setup io_uring/io_uring.c:4095 [inline] __se_sys_io_uring_setup io_uring/io_uring.c:4089 [inline] __x64_sys_io_uring_setup+0x98/0x140 io_uring/io_uring.c:4089 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:0x7fd960c7dea9 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:00007fd961912058 EFLAGS: 00000206 ORIG_RAX: 00000000000001a9 RAX: ffffffffffffffda RBX: 00007fd960dabf80 RCX: 00007fd960c7dea9 RDX: 0000000020000440 RSI: 00000000200006c0 RDI: 0000000000002ddd RBP: 00000000200006c0 R08: 0000000000000000 R09: 0000000020000440 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00000000200003c0 R14: 0000000000002ddd R15: 0000000020000440 ---------------- Code disassembly (best guess): 0: 01 df add %ebx,%edi 2: c1 c6 08 rol $0x8,%esi 5: 31 f0 xor %esi,%eax 7: 29 c3 sub %eax,%ebx 9: 89 de mov %ebx,%esi b: 89 c3 mov %eax,%ebx d: 01 f8 add %edi,%eax f: c1 c3 10 rol $0x10,%ebx 12: 31 f3 xor %esi,%ebx 14: 89 de mov %ebx,%esi 16: 29 df sub %ebx,%edi 18: 01 c3 add %eax,%ebx 1a: c1 ce 0d ror $0xd,%esi 1d: 31 f7 xor %esi,%edi 1f: 29 f8 sub %edi,%eax 21: 89 c6 mov %eax,%esi 23: 89 f8 mov %edi,%eax 25: 01 df add %ebx,%edi 27: c1 c0 04 rol $0x4,%eax * 2a: 31 f0 xor %esi,%eax <-- trapping instruction 2c: 83 f9 03 cmp $0x3,%ecx 2f: 77 9a ja 0xffffffcb 31: 83 f9 02 cmp $0x2,%ecx 34: 0f 84 fa 00 00 00 je 0x134 3a: 83 f9 03 cmp $0x3,%ecx 3d: 0f .byte 0xf 3e: 84 ee test %ch,%dh