====================================================== WARNING: possible circular locking dependency detected 6.4.0-syzkaller-12454-g1c7873e33645 #0 Not tainted ------------------------------------------------------ syz-executor.2/14643 is trying to acquire lock: ffff8880394141e8 (rlock-AF_UNIX){+.+.}-{2:2}, at: skb_queue_tail+0x25/0x150 net/core/skbuff.c:3736 but task is already holding lock: ffff888039414680 (&u->lock/1){+.+.}-{2:2}, at: unix_state_double_lock net/unix/af_unix.c:1341 [inline] ffff888039414680 (&u->lock/1){+.+.}-{2:2}, at: unix_state_double_lock+0x77/0xa0 net/unix/af_unix.c:1333 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&u->lock/1){+.+.}-{2:2}: _raw_spin_lock_nested+0x34/0x40 kernel/locking/spinlock.c:378 sk_diag_dump_icons net/unix/diag.c:87 [inline] sk_diag_fill+0x9f5/0xfc0 net/unix/diag.c:157 sk_diag_dump net/unix/diag.c:196 [inline] unix_diag_dump+0x456/0x730 net/unix/diag.c:220 netlink_dump+0x570/0xc50 net/netlink/af_netlink.c:2269 __netlink_dump_start+0x6c0/0x9b0 net/netlink/af_netlink.c:2376 netlink_dump_start include/linux/netlink.h:330 [inline] unix_diag_handler_dump net/unix/diag.c:319 [inline] unix_diag_handler_dump+0x679/0x9d0 net/unix/diag.c:308 __sock_diag_cmd net/core/sock_diag.c:238 [inline] sock_diag_rcv_msg+0x31e/0x440 net/core/sock_diag.c:269 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2549 sock_diag_rcv+0x2a/0x40 net/core/sock_diag.c:280 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1914 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg+0xde/0x190 net/socket.c:748 sock_write_iter+0x29b/0x3d0 net/socket.c:1129 call_write_iter include/linux/fs.h:1871 [inline] do_iter_readv_writev+0x211/0x3b0 fs/read_write.c:735 do_iter_write+0x182/0x810 fs/read_write.c:860 vfs_writev+0x1b0/0x670 fs/read_write.c:933 do_writev+0x270/0x2f0 fs/read_write.c:976 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (rlock-AF_UNIX){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3142 [inline] check_prevs_add kernel/locking/lockdep.c:3261 [inline] validate_chain kernel/locking/lockdep.c:3876 [inline] __lock_acquire+0x2e9d/0x5e20 kernel/locking/lockdep.c:5144 lock_acquire kernel/locking/lockdep.c:5761 [inline] lock_acquire+0x1b1/0x520 kernel/locking/lockdep.c:5726 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162 skb_queue_tail+0x25/0x150 net/core/skbuff.c:3736 unix_dgram_sendmsg+0xf22/0x1b70 net/unix/af_unix.c:2082 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg+0xde/0x190 net/socket.c:748 ____sys_sendmsg+0x34a/0x920 net/socket.c:2494 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2548 __sys_sendmmsg+0x18f/0x460 net/socket.c:2634 __do_sys_sendmmsg net/socket.c:2663 [inline] __se_sys_sendmmsg net/socket.c:2660 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2660 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&u->lock/1); lock(rlock-AF_UNIX); lock(&u->lock/1); lock(rlock-AF_UNIX); *** DEADLOCK *** 1 lock held by syz-executor.2/14643: #0: ffff888039414680 (&u->lock/1){+.+.}-{2:2}, at: unix_state_double_lock net/unix/af_unix.c:1341 [inline] #0: ffff888039414680 (&u->lock/1){+.+.}-{2:2}, at: unix_state_double_lock+0x77/0xa0 net/unix/af_unix.c:1333 stack backtrace: CPU: 1 PID: 14643 Comm: syz-executor.2 Not tainted 6.4.0-syzkaller-12454-g1c7873e33645 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 check_noncircular+0x2df/0x3b0 kernel/locking/lockdep.c:2195 check_prev_add kernel/locking/lockdep.c:3142 [inline] check_prevs_add kernel/locking/lockdep.c:3261 [inline] validate_chain kernel/locking/lockdep.c:3876 [inline] __lock_acquire+0x2e9d/0x5e20 kernel/locking/lockdep.c:5144 lock_acquire kernel/locking/lockdep.c:5761 [inline] lock_acquire+0x1b1/0x520 kernel/locking/lockdep.c:5726 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162 skb_queue_tail+0x25/0x150 net/core/skbuff.c:3736 unix_dgram_sendmsg+0xf22/0x1b70 net/unix/af_unix.c:2082 sock_sendmsg_nosec net/socket.c:725 [inline] sock_sendmsg+0xde/0x190 net/socket.c:748 ____sys_sendmsg+0x34a/0x920 net/socket.c:2494 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2548 __sys_sendmmsg+0x18f/0x460 net/socket.c:2634 __do_sys_sendmmsg net/socket.c:2663 [inline] __se_sys_sendmmsg net/socket.c:2660 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2660 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fccdc28c389 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fccdcf0f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007fccdc3abf80 RCX: 00007fccdc28c389 RDX: 0000000000000318 RSI: 00000000200bd000 RDI: 0000000000000005 RBP: 00007fccdc2d7493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdcddae1bf R14: 00007fccdcf0f300 R15: 0000000000022000