====================================================== WARNING: possible circular locking dependency detected 6.10.0-syzkaller-04483-g0be9ae5486cd #0 Not tainted ------------------------------------------------------ syz.0.271/6178 is trying to acquire lock: ffff888021359bd8 (&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 0xffffffffa00049b2 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 __traceiter_tlb_flush+0x77/0xd0 include/trace/events/tlb.h:38 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_7aab9edbcd54ca16+0x22/0x27 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_lock_killable include/linux/mmap_lock.h:154 [inline] __get_user_pages_locked mm/gup.c:1846 [inline] get_dump_page+0x2c7/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_page_fault+0x590/0x8c0 arch/x86/mm/fault.c:1542 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 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.0.271/6178: #0: ffff88807af74420 (sb_writers#5){.+.+}-{0:0}, at: do_coredump+0x19a9/0x2940 fs/coredump.c:766 #1: ffff88801bebcd98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock_killable include/linux/mmap_lock.h:153 [inline] #1: ffff88801bebcd98 (&mm->mmap_lock){++++}-{3:3}, at: __get_user_pages_locked mm/gup.c:1846 [inline] #1: ffff88801bebcd98 (&mm->mmap_lock){++++}-{3:3}, at: get_dump_page+0xe2/0x2f0 mm/gup.c:2389 #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: 6178 Comm: syz.0.271 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_7aab9edbcd54ca16+0x22/0x27 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_lock_killable include/linux/mmap_lock.h:154 [inline] __get_user_pages_locked mm/gup.c:1846 [inline] get_dump_page+0x2c7/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_page_fault+0x590/0x8c0 arch/x86/mm/fault.c:1542 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7fb212d75b61 Code: 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 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f RSP: 002b:000000000000f5f0 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fb212f05f60 RCX: 00007fb212d75b59 RDX: 0000000000000000 RSI: 000000000000f5f0 RDI: 0000000000000000 RBP: 00007fb212de4e5d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fb212f05f60 R15: 00007ffdc44c55f8