====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.83/4617 is trying to acquire lock: ffffffff8e362d98 (unix_gc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline] ffffffff8e362d98 (unix_gc_lock){+.+.}-{2:2}, at: unix_notinflight+0x136/0x370 net/unix/scm.c:73 but task is already holding lock: ffff88807da149e0 (rlock-AF_UNIX){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline] ffff88807da149e0 (rlock-AF_UNIX){+.+.}-{2:2}, at: queue_oob+0x534/0x820 net/unix/af_unix.c:2009 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rlock-AF_UNIX){+.+.}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:364 [inline] scan_inflight+0x48/0x3e0 net/unix/garbage.c:97 scan_children+0x271/0x420 net/unix/garbage.c:137 unix_gc+0x4cf/0x1140 net/unix/garbage.c:273 unix_release_sock+0xa5d/0xc60 net/unix/af_unix.c:609 unix_release+0x88/0xc0 net/unix/af_unix.c:944 __sock_release net/socket.c:651 [inline] sock_close+0xbf/0x210 net/socket.c:1346 __fput+0x212/0x8c0 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:184 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (unix_gc_lock){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:364 [inline] unix_notinflight+0x136/0x370 net/unix/scm.c:73 unix_detach_fds net/unix/scm.c:136 [inline] unix_destruct_scm+0x1a4/0x290 net/unix/scm.c:147 skb_release_head_state+0xf6/0x240 net/core/skbuff.c:729 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:756 [inline] consume_skb+0x72/0x100 net/core/skbuff.c:918 queue_oob+0x566/0x820 net/unix/af_unix.c:2011 unix_stream_sendmsg+0xb71/0xc90 net/unix/af_unix.c:2116 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2446 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2500 __sys_sendmsg net/socket.c:2529 [inline] __do_sys_sendmsg net/socket.c:2538 [inline] __se_sys_sendmsg+0x1b7/0x2a0 net/socket.c:2536 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rlock-AF_UNIX); lock(unix_gc_lock); lock(rlock-AF_UNIX); lock(unix_gc_lock); *** DEADLOCK *** 2 locks held by syz.0.83/4617: #0: ffff88807da14e90 (&u->lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline] #0: ffff88807da14e90 (&u->lock){+.+.}-{2:2}, at: queue_oob+0x396/0x820 net/unix/af_unix.c:1995 #1: ffff88807da149e0 (rlock-AF_UNIX){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline] #1: ffff88807da149e0 (rlock-AF_UNIX){+.+.}-{2:2}, at: queue_oob+0x534/0x820 net/unix/af_unix.c:2009 stack backtrace: CPU: 1 PID: 4617 Comm: syz.0.83 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:364 [inline] unix_notinflight+0x136/0x370 net/unix/scm.c:73 unix_detach_fds net/unix/scm.c:136 [inline] unix_destruct_scm+0x1a4/0x290 net/unix/scm.c:147 skb_release_head_state+0xf6/0x240 net/core/skbuff.c:729 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:756 [inline] consume_skb+0x72/0x100 net/core/skbuff.c:918 queue_oob+0x566/0x820 net/unix/af_unix.c:2011 unix_stream_sendmsg+0xb71/0xc90 net/unix/af_unix.c:2116 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2446 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2500 __sys_sendmsg net/socket.c:2529 [inline] __do_sys_sendmsg net/socket.c:2538 [inline] __se_sys_sendmsg+0x1b7/0x2a0 net/socket.c:2536 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f573e846559 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f573de9b028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f573eac2fa0 RCX: 00007f573e846559 RDX: 0000000000000003 RSI: 0000200000000f00 RDI: 0000000000000003 RBP: 00007f573e8d5136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f573eac3038 R14: 00007f573eac2fa0 R15: 00007ffe1e550808