====================================================== WARNING: possible circular locking dependency detected 6.10.0-syzkaller-04483-g0be9ae5486cd #0 Not tainted ------------------------------------------------------ syz.2.2055/13278 is trying to acquire lock: ffff888028f7ae58 (&sighand->siglock){-.-.}-{2:2}, at: __lock_task_sighand+0x149/0x2d0 kernel/signal.c:1412 but task is already holding lock: ffff8880b9438798 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438798 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (lock#10){+.+.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 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:164 [inline] stack_map_get_build_id_offset+0x9af/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 0xffffffffa000212a bpf_dispatcher_nop_func include/linux/bpf.h:1243 [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 __schedule_loop kernel/sched/core.c:6606 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6621 futex_wait_queue+0x14e/0x1d0 kernel/futex/waitwake.c:370 __futex_wait+0x17f/0x320 kernel/futex/waitwake.c:669 futex_wait+0x101/0x360 kernel/futex/waitwake.c:697 do_futex+0x33b/0x560 kernel/futex/syscalls.c:102 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x3f9/0x480 kernel/futex/syscalls.c:160 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 -> #1 (&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] _raw_spin_rq_lock_irqsave kernel/sched/sched.h:1435 [inline] rq_lock_irqsave kernel/sched/sched.h:1700 [inline] class_rq_lock_irqsave_constructor kernel/sched/sched.h:1749 [inline] sched_mm_cid_exit_signals+0x17b/0x4b0 kernel/sched/core.c:10245 exit_signals+0x2a1/0x5c0 kernel/signal.c:3022 do_exit+0x6b4/0x27f0 kernel/exit.c:834 __do_sys_exit kernel/exit.c:993 [inline] __se_sys_exit kernel/exit.c:991 [inline] __pfx___ia32_sys_exit+0x0/0x10 kernel/exit.c:991 x64_sys_call+0x2622/0x2640 arch/x86/include/generated/asm/syscalls_64.h:61 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 (&sighand->siglock){-.-.}-{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 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 __lock_task_sighand+0x149/0x2d0 kernel/signal.c:1412 lock_task_sighand include/linux/sched/signal.h:746 [inline] do_send_sig_info kernel/signal.c:1300 [inline] group_send_sig_info+0x274/0x310 kernel/signal.c:1451 bpf_send_signal_common+0x2dd/0x430 kernel/trace/bpf_trace.c:881 ____bpf_send_signal_thread kernel/trace/bpf_trace.c:898 [inline] bpf_send_signal_thread+0x16/0x20 kernel/trace/bpf_trace.c:896 bpf_prog_7bb747c56a8bcba8+0x1d/0x25 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [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_run4+0x334/0x590 kernel/trace/bpf_trace.c:2449 trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:52 [inline] __mmap_lock_do_trace_acquire_returned+0x5c8/0x630 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:164 [inline] get_mmap_lock_carefully mm/memory.c:5716 [inline] lock_mm_and_find_vma+0x213/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+0x8c/0xe0 lib/usercopy.c:28 copy_from_user include/linux/uaccess.h:183 [inline] ____sys_sendmsg+0x2e4/0x7d0 net/socket.c:2574 ___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 other info that might help us debug this: Chain exists of: &sighand->siglock --> &rq->__lock --> lock#10 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(lock#10); lock(&rq->__lock); lock(lock#10); lock(&sighand->siglock); *** DEADLOCK *** 5 locks held by syz.2.2055/13278: #0: ffff888058809e18 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #0: ffff888058809e18 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5716 [inline] #0: ffff888058809e18 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x32/0x2f0 mm/memory.c:5776 #1: ffff8880b9438798 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] #1: ffff8880b9438798 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 #2: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #2: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #2: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: get_memcg_path_buf mm/mmap_lock.c:139 [inline] #2: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: get_mm_memcg_path+0xb1/0x600 mm/mmap_lock.c:209 #3: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #3: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #3: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #3: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x244/0x590 kernel/trace/bpf_trace.c:2449 #4: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #4: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #4: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: __lock_task_sighand+0x29/0x2d0 kernel/signal.c:1395 stack backtrace: CPU: 0 PID: 13278 Comm: syz.2.2055 Not tainted 6.10.0-syzkaller-04483-g0be9ae5486cd #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 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 __lock_task_sighand+0x149/0x2d0 kernel/signal.c:1412 lock_task_sighand include/linux/sched/signal.h:746 [inline] do_send_sig_info kernel/signal.c:1300 [inline] group_send_sig_info+0x274/0x310 kernel/signal.c:1451 bpf_send_signal_common+0x2dd/0x430 kernel/trace/bpf_trace.c:881 ____bpf_send_signal_thread kernel/trace/bpf_trace.c:898 [inline] bpf_send_signal_thread+0x16/0x20 kernel/trace/bpf_trace.c:896 bpf_prog_7bb747c56a8bcba8+0x1d/0x25 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [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_run4+0x334/0x590 kernel/trace/bpf_trace.c:2449 trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:52 [inline] __mmap_lock_do_trace_acquire_returned+0x5c8/0x630 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:164 [inline] get_mmap_lock_carefully mm/memory.c:5716 [inline] lock_mm_and_find_vma+0x213/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 RIP: 0010:rep_movs_alternative+0x4a/0x70 arch/x86/lib/copy_user_64.S:71 Code: 75 f1 c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 48 8b 06 48 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 df 83 f9 08 73 e8 eb c9 a4 c3 cc cc cc cc 48 89 c8 48 c1 e9 03 83 e0 07 f3 48 a5 89 c1 RSP: 0018:ffffc900044a7af0 EFLAGS: 00050206 RAX: ffffffff84b01801 RBX: 0000000020002ab8 RCX: 0000000000000ab8 RDX: 0000000000000001 RSI: 0000000020002000 RDI: ffff88805d964600 RBP: ffffc900044a7c50 R08: ffff88805d9650b7 R09: 1ffff1100bb2ca16 R10: dffffc0000000000 R11: ffffed100bb2ca17 R12: 0000000020001a00 R13: ffff88805d964000 R14: ffff88805d964000 R15: 00000000000010b8 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+0x8c/0xe0 lib/usercopy.c:28 copy_from_user include/linux/uaccess.h:183 [inline] ____sys_sendmsg+0x2e4/0x7d0 net/socket.c:2574 ___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 RIP: 0033:0x7f4152575b59 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4153341048 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f4152705f60 RCX: 00007f4152575b59 RDX: 000000000000ff00 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00007f41525e4e5d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f4152705f60 R15: 00007ffebc206a48 ---------------- Code disassembly (best guess): 0: 75 f1 jne 0xfffffff3 2: c3 ret 3: cc int3 4: cc int3 5: cc int3 6: cc int3 7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) e: 00 00 10: 48 8b 06 mov (%rsi),%rax 13: 48 89 07 mov %rax,(%rdi) 16: 48 83 c6 08 add $0x8,%rsi 1a: 48 83 c7 08 add $0x8,%rdi 1e: 83 e9 08 sub $0x8,%ecx 21: 74 df je 0x2 23: 83 f9 08 cmp $0x8,%ecx 26: 73 e8 jae 0x10 28: eb c9 jmp 0xfffffff3 * 2a: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) <-- trapping instruction 2c: c3 ret 2d: cc int3 2e: cc int3 2f: cc int3 30: cc int3 31: 48 89 c8 mov %rcx,%rax 34: 48 c1 e9 03 shr $0x3,%rcx 38: 83 e0 07 and $0x7,%eax 3b: f3 48 a5 rep movsq %ds:(%rsi),%es:(%rdi) 3e: 89 c1 mov %eax,%ecx