====================================================== WARNING: possible circular locking dependency detected 5.15.156-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/8794 is trying to acquire lock: ffff800016b2a1d8 (unix_gc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] ffff800016b2a1d8 (unix_gc_lock){+.+.}-{2:2}, at: unix_notinflight+0x118/0x32c net/unix/scm.c:73 but task is already holding lock: ffff0000d9657688 (&u->lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] ffff0000d9657688 (&u->lock){+.+.}-{2:2}, at: unix_stream_read_generic+0x2f0/0x1c80 net/unix/af_unix.c:2639 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&u->lock){+.+.}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] unix_gc+0x3b4/0x109c net/unix/garbage.c:263 unix_release_sock+0x678/0x814 net/unix/af_unix.c:607 unix_release+0x98/0xd0 net/unix/af_unix.c:950 __sock_release net/socket.c:649 [inline] sock_close+0xb8/0x1fc net/socket.c:1336 __fput+0x30c/0x7f0 fs/file_table.c:280 ____fput+0x20/0x30 fs/file_table.c:308 task_work_run+0x130/0x1e4 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x262c/0x32b8 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> #0 (unix_gc_lock){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] unix_notinflight+0x118/0x32c net/unix/scm.c:73 unix_detach_fds net/unix/scm.c:136 [inline] unix_destruct_scm+0x1bc/0x2d8 net/unix/scm.c:147 skb_release_head_state+0x108/0x2a0 net/core/skbuff.c:729 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:756 [inline] kfree_skb_reason+0x1ac/0x46c net/core/skbuff.c:776 kfree_skb include/linux/skbuff.h:1123 [inline] manage_oob net/unix/af_unix.c:2572 [inline] unix_stream_read_generic+0x1704/0x1c80 net/unix/af_unix.c:2649 unix_stream_recvmsg+0x1d0/0x250 net/unix/af_unix.c:2848 ____sys_recvmsg+0x234/0x720 ___sys_recvmsg+0x240/0x2cc net/socket.c:2692 __sys_recvmsg net/socket.c:2722 [inline] __do_sys_recvmsg net/socket.c:2732 [inline] __se_sys_recvmsg net/socket.c:2729 [inline] __arm64_sys_recvmsg+0x1a8/0x258 net/socket.c:2729 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&u->lock); lock(unix_gc_lock); lock(&u->lock); lock(unix_gc_lock); *** DEADLOCK *** 2 locks held by syz-executor.3/8794: #0: ffff0000d9657598 (&u->iolock){+.+.}-{3:3}, at: unix_stream_read_generic+0x10a8/0x1c80 net/unix/af_unix.c:2690 #1: ffff0000d9657688 (&u->lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #1: ffff0000d9657688 (&u->lock){+.+.}-{2:2}, at: unix_stream_read_generic+0x2f0/0x1c80 net/unix/af_unix.c:2639 stack backtrace: CPU: 1 PID: 8794 Comm: syz-executor.3 Not tainted 5.15.156-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2011 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] unix_notinflight+0x118/0x32c net/unix/scm.c:73 unix_detach_fds net/unix/scm.c:136 [inline] unix_destruct_scm+0x1bc/0x2d8 net/unix/scm.c:147 skb_release_head_state+0x108/0x2a0 net/core/skbuff.c:729 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:756 [inline] kfree_skb_reason+0x1ac/0x46c net/core/skbuff.c:776 kfree_skb include/linux/skbuff.h:1123 [inline] manage_oob net/unix/af_unix.c:2572 [inline] unix_stream_read_generic+0x1704/0x1c80 net/unix/af_unix.c:2649 unix_stream_recvmsg+0x1d0/0x250 net/unix/af_unix.c:2848 ____sys_recvmsg+0x234/0x720 ___sys_recvmsg+0x240/0x2cc net/socket.c:2692 __sys_recvmsg net/socket.c:2722 [inline] __do_sys_recvmsg net/socket.c:2732 [inline] __se_sys_recvmsg net/socket.c:2729 [inline] __arm64_sys_recvmsg+0x1a8/0x258 net/socket.c:2729 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584