====================================================== WARNING: possible circular locking dependency detected 6.9.0-rc6-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/5482 is trying to acquire lock: ffff8880b94387e8 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b94387e8 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8b/0x620 mm/mmap_lock.c:237 but task is already holding lock: ffff8880b943e698 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:559 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rq->__lock){-.-.}-{2:2}: _raw_spin_lock_nested+0x2d/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:559 raw_spin_rq_lock kernel/sched/sched.h:1387 [inline] _raw_spin_rq_lock_irqsave kernel/sched/sched.h:1406 [inline] rq_lock_irqsave kernel/sched/sched.h:1685 [inline] class_rq_lock_irqsave_constructor kernel/sched/sched.h:1739 [inline] sched_mm_cid_exit_signals+0x177/0x4b0 kernel/sched/core.c:12005 exit_signals+0x29d/0x5c0 kernel/signal.c:3016 do_exit+0x6a4/0x27c0 kernel/exit.c:837 __do_sys_exit kernel/exit.c:994 [inline] __se_sys_exit kernel/exit.c:992 [inline] __x64_sys_exit+0x3c/0x40 kernel/exit.c:992 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x84/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #1 (&sighand->siglock){....}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 __lock_task_sighand+0x145/0x2d0 kernel/signal.c:1414 lock_task_sighand include/linux/sched/signal.h:746 [inline] do_send_sig_info kernel/signal.c:1300 [inline] group_send_sig_info+0x270/0x300 kernel/signal.c:1453 bpf_send_signal_common+0x2d9/0x430 kernel/trace/bpf_trace.c:881 ____bpf_send_signal_thread kernel/trace/bpf_trace.c:898 [inline] bpf_send_signal_thread+0x12/0x20 kernel/trace/bpf_trace.c:896 bpf_prog_7bb747c56a8bcba8+0x15/0x1d 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_run4+0x256/0x480 kernel/trace/bpf_trace.c:2422 trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:52 [inline] __mmap_lock_do_trace_acquire_returned+0x5b2/0x620 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:125 [inline] setup_arg_pages+0x10aa/0x1100 fs/exec.c:803 load_elf_binary+0xb99/0x2590 fs/binfmt_elf.c:1013 search_binary_handler fs/exec.c:1778 [inline] exec_binprm fs/exec.c:1820 [inline] bprm_execve+0xaf4/0x17b0 fs/exec.c:1872 do_execveat_common+0x553/0x700 fs/exec.c:1979 do_execve fs/exec.c:2053 [inline] __do_sys_execve fs/exec.c:2129 [inline] __se_sys_execve fs/exec.c:2124 [inline] __x64_sys_execve+0x8e/0xa0 fs/exec.c:2124 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x84/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #0 (lock#10){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x3a1f/0x7fa0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e9/0x540 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa4/0x620 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+0x9a6/0x9c0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4a9/0x590 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1985 [inline] bpf_get_stack_raw_tp+0x19f/0x230 kernel/trace/bpf_trace.c:1975 bpf_prog_e6cf5f9c69743609+0x3a/0x3e 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_run4+0x256/0x480 kernel/trace/bpf_trace.c:2422 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x27f6/0x4bf0 kernel/sched/core.c:6743 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6925 preempt_schedule+0xdd/0xf0 kernel/sched/core.c:6949 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk_64.S:12 class_preempt_destructor include/linux/preempt.h:480 [inline] try_to_wake_up+0x9a4/0x1450 kernel/sched/core.c:4385 wake_up_process kernel/sched/core.c:4510 [inline] wake_up_q+0xc4/0x110 kernel/sched/core.c:1029 futex_wake+0x51f/0x5c0 kernel/futex/waitwake.c:199 do_futex+0x38e/0x550 kernel/futex/syscalls.c:107 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x3f5/0x480 kernel/futex/syscalls.c:160 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x84/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e other info that might help us debug this: Chain exists of: lock#10 --> &sighand->siglock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&sighand->siglock); lock(&rq->__lock); lock(lock#10); *** DEADLOCK *** 3 locks held by syz-executor.0/5482: #0: ffff8880b943e698 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:559 #1: ffffffff8dd321a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8dd321a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8dd321a0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #1: ffffffff8dd321a0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x16a/0x480 kernel/trace/bpf_trace.c:2422 #2: ffff88801f8fa7a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #2: ffff88801f8fa7a0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x233/0x9c0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 5482 Comm: syz-executor.0 Not tainted 6.9.0-rc6-syzkaller #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+0x23d/0x360 lib/dump_stack.c:114 check_noncircular+0x375/0x4a0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x3a1f/0x7fa0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e9/0x540 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa4/0x620 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+0x9a6/0x9c0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4a9/0x590 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1985 [inline] bpf_get_stack_raw_tp+0x19f/0x230 kernel/trace/bpf_trace.c:1975 bpf_prog_e6cf5f9c69743609+0x3a/0x3e 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_run4+0x256/0x480 kernel/trace/bpf_trace.c:2422 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x27f6/0x4bf0 kernel/sched/core.c:6743 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6925 preempt_schedule+0xdd/0xf0 kernel/sched/core.c:6949 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk_64.S:12 class_preempt_destructor include/linux/preempt.h:480 [inline] try_to_wake_up+0x9a4/0x1450 kernel/sched/core.c:4385 wake_up_process kernel/sched/core.c:4510 [inline] wake_up_q+0xc4/0x110 kernel/sched/core.c:1029 futex_wake+0x51f/0x5c0 kernel/futex/waitwake.c:199 do_futex+0x38e/0x550 kernel/futex/syscalls.c:107 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x3f5/0x480 kernel/futex/syscalls.c:160 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x84/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7efce967de69 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:00007efcea4aa178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007efce97abf88 RCX: 00007efce967de69 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007efce97abf8c RBP: 00007efce97abf80 R08: 00007efcea4ab0b0 R09: 00007efcea4aa6c0 R10: 0000000000000007 R11: 0000000000000246 R12: 00007efce97abf8c R13: 000000000000000b R14: 00007fffcdf88160 R15: 00007fffcdf88248