====================================================== WARNING: possible circular locking dependency detected 6.10.0-syzkaller-04483-g0be9ae5486cd #0 Not tainted ------------------------------------------------------ syz-executor/7336 is trying to acquire lock: ffff888021d0ae58 (&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 bpf_prog_1994883f5a25407d+0xe/0x2c 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 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6708 preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6732 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12 class_preempt_destructor include/linux/preempt.h:480 [inline] try_to_wake_up+0x9a1/0x1470 kernel/sched/core.c:4174 wake_up_process kernel/sched/core.c:4299 [inline] wake_up_q+0xc8/0x120 kernel/sched/core.c:1029 futex_wake+0x523/0x5c0 kernel/futex/waitwake.c:199 do_futex+0x392/0x560 kernel/futex/syscalls.c:107 __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_write_lock_killable include/linux/mmap_lock.h:123 [inline] dup_mmap kernel/fork.c:634 [inline] dup_mm kernel/fork.c:1671 [inline] copy_mm+0x1e9a/0x1f30 kernel/fork.c:1720 copy_process+0x187a/0x3dc0 kernel/fork.c:2373 kernel_clone+0x226/0x8f0 kernel/fork.c:2780 __do_sys_clone kernel/fork.c:2923 [inline] __se_sys_clone kernel/fork.c:2907 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2907 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 *** 6 locks held by syz-executor/7336: #0: ffffffff8e3e34b0 (dup_mmap_sem){++++}-{0:0}, at: dup_mmap kernel/fork.c:633 [inline] #0: ffffffff8e3e34b0 (dup_mmap_sem){++++}-{0:0}, at: dup_mm kernel/fork.c:1671 [inline] #0: ffffffff8e3e34b0 (dup_mmap_sem){++++}-{0:0}, at: copy_mm+0x277/0x1f30 kernel/fork.c:1720 #1: ffff888066cf3a98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:122 [inline] #1: ffff888066cf3a98 (&mm->mmap_lock){++++}-{3:3}, at: dup_mmap kernel/fork.c:634 [inline] #1: ffff888066cf3a98 (&mm->mmap_lock){++++}-{3:3}, at: dup_mm kernel/fork.c:1671 [inline] #1: ffff888066cf3a98 (&mm->mmap_lock){++++}-{3:3}, at: copy_mm+0x29a/0x1f30 kernel/fork.c:1720 #2: ffff8880b9438798 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] #2: ffff8880b9438798 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 #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: get_memcg_path_buf mm/mmap_lock.c:139 [inline] #3: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: get_mm_memcg_path+0xb1/0x600 mm/mmap_lock.c:209 #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: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #4: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x244/0x590 kernel/trace/bpf_trace.c:2449 #5: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #5: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #5: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: __lock_task_sighand+0x29/0x2d0 kernel/signal.c:1395 stack backtrace: CPU: 0 PID: 7336 Comm: syz-executor 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_write_lock_killable include/linux/mmap_lock.h:123 [inline] dup_mmap kernel/fork.c:634 [inline] dup_mm kernel/fork.c:1671 [inline] copy_mm+0x1e9a/0x1f30 kernel/fork.c:1720 copy_process+0x187a/0x3dc0 kernel/fork.c:2373 kernel_clone+0x226/0x8f0 kernel/fork.c:2780 __do_sys_clone kernel/fork.c:2923 [inline] __se_sys_clone kernel/fork.c:2907 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2907 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:0x7f4fc756c453 Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00 RSP: 002b:00007ffd9e995ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4fc756c453 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 000055557acb37d0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000