====================================================== WARNING: possible circular locking dependency detected 6.10.0-syzkaller-04559-g7d30b8aa4fc3 #0 Not tainted ------------------------------------------------------ syz.1.1222/11607 is trying to acquire lock: ffff8880b9238798 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9238798 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_start_locking+0x83/0x620 mm/mmap_lock.c:230 but task is already holding lock: ffff8880b923e858 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560 raw_spin_rq_lock kernel/sched/sched.h:1415 [inline] rq_lock kernel/sched/sched.h:1714 [inline] task_fork_fair+0x61/0x1e0 kernel/sched/fair.c:12710 sched_cgroup_fork+0x37c/0x410 kernel/sched/core.c:4633 copy_process+0x2217/0x3dc0 kernel/fork.c:2482 kernel_clone+0x226/0x8f0 kernel/fork.c:2780 user_mode_thread+0x132/0x1a0 kernel/fork.c:2858 rest_init+0x23/0x300 init/main.c:712 start_kernel+0x47a/0x500 init/main.c:1103 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0x99/0xa0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x147 -> #1 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline] try_to_wake_up+0xb0/0x1470 kernel/sched/core.c:4051 rcu_read_unlock_special+0x3db/0x550 kernel/rcu/tree_plugin.h:665 __rcu_read_unlock+0xa1/0x110 kernel/rcu/tree_plugin.h:436 __mmap_lock_do_trace_start_locking+0x1f2/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] get_mmap_lock_carefully mm/memory.c:5716 [inline] lock_mm_and_find_vma+0x1f1/0x2f0 mm/memory.c:5776 do_user_addr_fault arch/x86/mm/fault.c:1361 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x1bf/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x4a/0x70 arch/x86/lib/copy_user_64.S:65 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_iter lib/iov_iter.c:55 [inline] iterate_ubuf include/linux/iov_iter.h:29 [inline] iterate_and_advance2 include/linux/iov_iter.h:245 [inline] iterate_and_advance include/linux/iov_iter.h:271 [inline] __copy_from_iter lib/iov_iter.c:249 [inline] _copy_from_iter+0x26b/0x1960 lib/iov_iter.c:260 copy_from_iter include/linux/uio.h:204 [inline] copy_from_iter_full include/linux/uio.h:221 [inline] do_copy_data_nocache net/mptcp/protocol.c:1763 [inline] mptcp_sendmsg+0xd31/0x1b10 net/mptcp/protocol.c:1870 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (lock#10){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5136 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] stack_map_get_build_id_offset+0x98a/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:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+0x43/0x47 bpf_dispatcher_nop_func include/linux/bpf.h:1252 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x7cb/0xae0 context_switch kernel/sched/core.c:5172 [inline] __schedule+0x1079/0x4a60 kernel/sched/core.c:6529 preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:6851 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 lock_is_held_type+0x13b/0x190 lock_is_held include/linux/lockdep.h:231 [inline] rcu_read_lock_sched_held+0x8d/0x130 kernel/rcu/update.c:126 task_css include/linux/cgroup.h:434 [inline] mem_cgroup_from_task+0x4d/0x120 mm/memcontrol.c:1214 count_memcg_event_mm+0x195/0x420 include/linux/memcontrol.h:1076 mm_account_fault mm/memory.c:5558 [inline] handle_mm_fault+0x16c4/0x1ba0 mm/memory.c:5705 faultin_page mm/gup.c:1305 [inline] __get_user_pages+0x6ec/0x16a0 mm/gup.c:1604 __get_user_pages_locked mm/gup.c:1871 [inline] get_dump_page+0x155/0x2f0 mm/gup.c:2389 dump_user_range+0x14c/0x950 fs/coredump.c:952 elf_core_dump+0x3de6/0x4720 fs/binfmt_elf.c:2116 do_coredump+0x19e1/0x2940 fs/coredump.c:767 get_signal+0x13fa/0x1740 kernel/signal.c:2902 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] irqentry_exit_to_user_mode+0x79/0x280 kernel/entry/common.c:231 exc_general_protection+0x410/0x5d0 arch/x86/kernel/traps.c:644 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617 other info that might help us debug this: Chain exists of: lock#10 --> &p->pi_lock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&p->pi_lock); lock(&rq->__lock); lock(lock#10); *** DEADLOCK *** 5 locks held by syz.1.1222/11607: #0: ffff88805db82420 (sb_writers#5){.+.+}-{0:0}, at: do_coredump+0x19a9/0x2940 fs/coredump.c:766 #1: ffff888029edba98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock_killable include/linux/mmap_lock.h:153 [inline] #1: ffff888029edba98 (&mm->mmap_lock){++++}-{3:3}, at: __get_user_pages_locked mm/gup.c:1846 [inline] #1: ffff888029edba98 (&mm->mmap_lock){++++}-{3:3}, at: get_dump_page+0xe2/0x2f0 mm/gup.c:2389 #2: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #2: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #2: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: count_memcg_event_mm+0x94/0x420 include/linux/memcontrol.h:1074 #3: ffff8880b923e858 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560 #4: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #4: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #4: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #4: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2447 stack backtrace: CPU: 0 PID: 11607 Comm: syz.1.1222 Not tainted 6.10.0-syzkaller-04559-g7d30b8aa4fc3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2186 check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5136 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] stack_map_get_build_id_offset+0x98a/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:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+0x43/0x47 bpf_dispatcher_nop_func include/linux/bpf.h:1252 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x7cb/0xae0 context_switch kernel/sched/core.c:5172 [inline] __schedule+0x1079/0x4a60 kernel/sched/core.c:6529 preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:6851 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_is_held_type+0x13b/0x190 Code: 75 44 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 75 4c 41 f7 c4 00 02 00 00 74 01 fb 65 48 8b 04 25 28 00 00 00 <48> 3b 44 24 08 75 42 89 d8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f RSP: 0018:ffffc9000310ebb8 EFLAGS: 00000206 RAX: fd24b208edf0d300 RBX: 0000000000000000 RCX: 0000000080000000 RDX: 0000000000000000 RSI: ffffffff8beadaa0 RDI: ffffffff8c4047a0 RBP: 0000000000000003 R08: ffffffff81e3eef9 R09: 1ffffffff269e0b8 R10: dffffc0000000000 R11: fffffbfff269e0b9 R12: 0000000000000246 R13: ffff88801b75da00 R14: 00000000ffffffff R15: ffffffff8e735f60 lock_is_held include/linux/lockdep.h:231 [inline] rcu_read_lock_sched_held+0x8d/0x130 kernel/rcu/update.c:126 task_css include/linux/cgroup.h:434 [inline] mem_cgroup_from_task+0x4d/0x120 mm/memcontrol.c:1214 count_memcg_event_mm+0x195/0x420 include/linux/memcontrol.h:1076 mm_account_fault mm/memory.c:5558 [inline] handle_mm_fault+0x16c4/0x1ba0 mm/memory.c:5705 faultin_page mm/gup.c:1305 [inline] __get_user_pages+0x6ec/0x16a0 mm/gup.c:1604 __get_user_pages_locked mm/gup.c:1871 [inline] get_dump_page+0x155/0x2f0 mm/gup.c:2389 dump_user_range+0x14c/0x950 fs/coredump.c:952 elf_core_dump+0x3de6/0x4720 fs/binfmt_elf.c:2116 do_coredump+0x19e1/0x2940 fs/coredump.c:767 get_signal+0x13fa/0x1740 kernel/signal.c:2902 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] irqentry_exit_to_user_mode+0x79/0x280 kernel/entry/common.c:231 exc_general_protection+0x410/0x5d0 arch/x86/kernel/traps.c:644 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617 RIP: 0033:0x7efd383772a1 Code: Unable to access opcode bytes at 0x7efd38377277. RSP: 002b:0000000020000010 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007efd38506058 RCX: 00007efd38377299 RDX: 0000000020000040 RSI: 0000000020000010 RDI: 0000000000000000 RBP: 00007efd383e48e6 R08: 00000000200000c0 R09: 00000000200000c0 R10: 0000000020000080 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007efd38506058 R15: 00007ffcdf23b748 ---------------- Code disassembly (best guess): 0: 75 44 jne 0x46 2: 48 c7 04 24 00 00 00 movq $0x0,(%rsp) 9: 00 a: 9c pushf b: 8f 04 24 pop (%rsp) e: f7 04 24 00 02 00 00 testl $0x200,(%rsp) 15: 75 4c jne 0x63 17: 41 f7 c4 00 02 00 00 test $0x200,%r12d 1e: 74 01 je 0x21 20: fb sti 21: 65 48 8b 04 25 28 00 mov %gs:0x28,%rax 28: 00 00 * 2a: 48 3b 44 24 08 cmp 0x8(%rsp),%rax <-- trapping instruction 2f: 75 42 jne 0x73 31: 89 d8 mov %ebx,%eax 33: 48 83 c4 10 add $0x10,%rsp 37: 5b pop %rbx 38: 41 5c pop %r12 3a: 41 5d pop %r13 3c: 41 5e pop %r14 3e: 41 5f pop %r15