====================================================== WARNING: possible circular locking dependency detected 5.0.0+ #101 Not tainted ------------------------------------------------------ syz-executor.3/17152 is trying to acquire lock: 0000000079e5c242 (rlock-AF_UNIX){+.+.}, at: skb_queue_tail+0x26/0x150 net/core/skbuff.c:2972 but task is already holding lock: 000000001d9c8a6e (&(&u->lock)->rlock/1){+.+.}, at: unix_state_double_lock net/unix/af_unix.c:1087 [inline] 000000001d9c8a6e (&(&u->lock)->rlock/1){+.+.}, at: unix_state_double_lock+0x80/0xb0 net/unix/af_unix.c:1079 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&(&u->lock)->rlock/1){+.+.}: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 _raw_spin_lock_nested+0x35/0x50 kernel/locking/spinlock.c:354 sk_diag_dump_icons net/unix/diag.c:83 [inline] sk_diag_fill.isra.0+0x9c0/0xf30 net/unix/diag.c:145 sk_diag_dump net/unix/diag.c:179 [inline] unix_diag_dump+0x35c/0x550 net/unix/diag.c:207 netlink_dump+0x55d/0xfb0 net/netlink/af_netlink.c:2252 __netlink_dump_start+0x5b4/0x7e0 net/netlink/af_netlink.c:2360 netlink_dump_start include/linux/netlink.h:226 [inline] unix_diag_handler_dump+0x390/0x740 net/unix/diag.c:308 __sock_diag_cmd net/core/sock_diag.c:232 [inline] sock_diag_rcv_msg+0x322/0x410 net/core/sock_diag.c:263 netlink_rcv_skb+0x17a/0x460 net/netlink/af_netlink.c:2485 sock_diag_rcv+0x2b/0x40 net/core/sock_diag.c:274 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x536/0x720 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1925 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:661 sock_write_iter+0x27c/0x3e0 net/socket.c:988 call_write_iter include/linux/fs.h:1863 [inline] do_iter_readv_writev+0x5e1/0x8e0 fs/read_write.c:680 do_iter_write fs/read_write.c:956 [inline] do_iter_write+0x184/0x610 fs/read_write.c:937 vfs_writev+0x1b3/0x2f0 fs/read_write.c:1001 do_writev+0xf6/0x290 fs/read_write.c:1036 __do_sys_writev fs/read_write.c:1109 [inline] __se_sys_writev fs/read_write.c:1106 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1106 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (rlock-AF_UNIX){+.+.}: check_prevs_add kernel/locking/lockdep.c:2333 [inline] validate_chain kernel/locking/lockdep.c:2714 [inline] __lock_acquire+0x239c/0x3fb0 kernel/locking/lockdep.c:3701 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152 skb_queue_tail+0x26/0x150 net/core/skbuff.c:2972 unix_dgram_sendmsg+0xc31/0x11e0 net/unix/af_unix.c:1755 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:661 ___sys_sendmsg+0x3e2/0x930 net/socket.c:2260 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2355 __do_sys_sendmmsg net/socket.c:2384 [inline] __se_sys_sendmmsg net/socket.c:2381 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2381 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&u->lock)->rlock/1); lock(rlock-AF_UNIX); lock(&(&u->lock)->rlock/1); lock(rlock-AF_UNIX); *** DEADLOCK *** 1 lock held by syz-executor.3/17152: #0: 000000001d9c8a6e (&(&u->lock)->rlock/1){+.+.}, at: unix_state_double_lock net/unix/af_unix.c:1087 [inline] #0: 000000001d9c8a6e (&(&u->lock)->rlock/1){+.+.}, at: unix_state_double_lock+0x80/0xb0 net/unix/af_unix.c:1079 stack backtrace: CPU: 0 PID: 17152 Comm: syz-executor.3 Not tainted 5.0.0+ #101 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1571 check_prev_add.constprop.0+0xf11/0x23c0 kernel/locking/lockdep.c:2220 check_prevs_add kernel/locking/lockdep.c:2333 [inline] validate_chain kernel/locking/lockdep.c:2714 [inline] __lock_acquire+0x239c/0x3fb0 kernel/locking/lockdep.c:3701 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152 skb_queue_tail+0x26/0x150 net/core/skbuff.c:2972 unix_dgram_sendmsg+0xc31/0x11e0 net/unix/af_unix.c:1755 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:661 ___sys_sendmsg+0x3e2/0x930 net/socket.c:2260 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2355 __do_sys_sendmmsg net/socket.c:2384 [inline] __se_sys_sendmmsg net/socket.c:2381 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2381 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458079 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f29d5acec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000458079 RDX: 0000000000000033 RSI: 00000000200bd000 RDI: 000000000000000d RBP: 000000000073c0e0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000403fc R11: 0000000000000246 R12: 00007f29d5acf6d4 R13: 00000000004c4fd9 R14: 00000000004d8d80 R15: 00000000ffffffff