====================================================== WARNING: possible circular locking dependency detected 6.9.0-rc5-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/5550 is trying to acquire lock: ffff8880b94387a8 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b94387a8 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x620 mm/mmap_lock.c:237 but task is already holding lock: ffff8880b943e658 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/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+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/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+0x17b/0x4b0 kernel/sched/core.c:12005 exit_signals+0x2a1/0x5c0 kernel/signal.c:3016 do_exit+0x6a8/0x27d0 kernel/exit.c:837 __do_sys_exit kernel/exit.c:994 [inline] __se_sys_exit kernel/exit.c:992 [inline] __pfx___ia32_sys_exit+0x0/0x10 kernel/exit.c:992 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x88/0x170 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+0xd5/0x120 kernel/locking/spinlock.c:162 __lock_task_sighand+0x149/0x2e0 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+0x274/0x310 kernel/signal.c:1453 bpf_send_signal_common+0x2dd/0x430 kernel/trace/bpf_trace.c:881 ____bpf_send_signal kernel/trace/bpf_trace.c:886 [inline] bpf_send_signal+0x19/0x30 kernel/trace/bpf_trace.c:884 bpf_prog_9fbc3d1d47c9b36c+0x22/0x29 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+0x25a/0x490 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+0x5ba/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] get_mmap_lock_carefully mm/memory.c:5633 [inline] lock_mm_and_find_vma+0x213/0x2f0 mm/memory.c:5693 do_user_addr_fault arch/x86/mm/fault.c:1385 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x20b/0x8a0 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 strncpy_from_user+0xfa/0x2d0 lib/strncpy_from_user.c:139 getname_flags+0xfa/0x4f0 fs/namei.c:150 user_path_at_empty+0x2c/0x60 fs/namei.c:2920 user_path_at include/linux/namei.h:57 [inline] user_statfs+0xd9/0x460 fs/statfs.c:103 __do_sys_statfs fs/statfs.c:195 [inline] __se_sys_statfs fs/statfs.c:192 [inline] __x64_sys_statfs+0xe8/0x1a0 fs/statfs.c:192 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x88/0x170 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+0x3a23/0x7fa0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x540 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/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+0x9b2/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:1985 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1975 bpf_prog_e6cf5f9c69743609+0x42/0x46 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+0x25a/0x490 kernel/trace/bpf_trace.c:2422 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x27c0/0x4be0 kernel/sched/core.c:6743 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6925 preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6949 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:12 class_preempt_destructor include/linux/preempt.h:480 [inline] try_to_wake_up+0x9a8/0x1470 kernel/sched/core.c:4385 wake_up_process kernel/sched/core.c:4510 [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+0x88/0x170 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.2/5550: #0: ffff8880b943e658 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #1: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #1: ffffffff8dd30220 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x16e/0x490 kernel/trace/bpf_trace.c:2422 #2: ffff88802d123920 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #2: ffff88802d123920 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 5550 Comm: syz-executor.2 Not tainted 6.9.0-rc5-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+0x241/0x360 lib/dump_stack.c:114 check_noncircular+0x379/0x4b0 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+0x3a23/0x7fa0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x540 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/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+0x9b2/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:1985 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1975 bpf_prog_e6cf5f9c69743609+0x42/0x46 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+0x25a/0x490 kernel/trace/bpf_trace.c:2422 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x27c0/0x4be0 kernel/sched/core.c:6743 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6925 preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6949 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:12 class_preempt_destructor include/linux/preempt.h:480 [inline] try_to_wake_up+0x9a8/0x1470 kernel/sched/core.c:4385 wake_up_process kernel/sched/core.c:4510 [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+0x88/0x170 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f15b567dea9 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:00007f15b647e178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f15b57abf88 RCX: 00007f15b567dea9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f15b57abf8c RBP: 00007f15b57abf80 R08: 00007f15b647f0b0 R09: 00007f15b647e6c0 R10: 0000000000000007 R11: 0000000000000246 R12: 00007f15b57abf8c R13: 000000000000000b R14: 00007ffd686772d0 R15: 00007ffd686773b8