====================================================== WARNING: possible circular locking dependency detected 4.17.0-rc6+ #74 Not tainted ------------------------------------------------------ syz-executor0/10509 is trying to acquire lock: 00000000506f0860 (rlock-AF_UNIX){+.+.}, at: skb_queue_tail+0x26/0x150 net/core/skbuff.c:2915 but task is already holding lock: 0000000074dacab3 (&(&u->lock)->rlock/1){+.+.}, at: unix_state_double_lock+0x80/0xb0 net/unix/af_unix.c:1078 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&(&u->lock)->rlock/1){+.+.}: _raw_spin_lock_nested+0x28/0x40 kernel/locking/spinlock.c:354 sk_diag_dump_icons net/unix/diag.c:82 [inline] sk_diag_fill.isra.5+0xa43/0x10d0 net/unix/diag.c:144 sk_diag_dump net/unix/diag.c:178 [inline] unix_diag_dump+0x35f/0x550 net/unix/diag.c:206 netlink_dump+0x507/0xd20 net/netlink/af_netlink.c:2226 __netlink_dump_start+0x51a/0x780 net/netlink/af_netlink.c:2323 netlink_dump_start include/linux/netlink.h:214 [inline] unix_diag_handler_dump+0x3f4/0x7b0 net/unix/diag.c:307 __sock_diag_cmd net/core/sock_diag.c:230 [inline] sock_diag_rcv_msg+0x2e0/0x3d0 net/core/sock_diag.c:261 netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2448 sock_diag_rcv+0x2a/0x40 net/core/sock_diag.c:272 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x58b/0x740 net/netlink/af_netlink.c:1336 netlink_sendmsg+0x9f0/0xfa0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 sock_write_iter+0x35a/0x5a0 net/socket.c:908 call_write_iter include/linux/fs.h:1784 [inline] do_iter_readv_writev+0x859/0xa50 fs/read_write.c:680 do_iter_write+0x185/0x5f0 fs/read_write.c:959 vfs_writev+0x1c7/0x330 fs/read_write.c:1004 do_writev+0x112/0x2f0 fs/read_write.c:1039 __do_sys_writev fs/read_write.c:1112 [inline] __se_sys_writev fs/read_write.c:1109 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1109 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (rlock-AF_UNIX){+.+.}: lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 skb_queue_tail+0x26/0x150 net/core/skbuff.c:2915 unix_dgram_sendmsg+0xf77/0x1730 net/unix/af_unix.c:1797 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 ___sys_sendmsg+0x525/0x940 net/socket.c:2117 __sys_sendmmsg+0x240/0x6f0 net/socket.c:2212 __do_sys_sendmmsg net/socket.c:2241 [inline] __se_sys_sendmmsg net/socket.c:2238 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2238 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 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-executor0/10509: #0: 0000000074dacab3 (&(&u->lock)->rlock/1){+.+.}, at: unix_state_double_lock+0x80/0xb0 net/unix/af_unix.c:1078 stack backtrace: CPU: 0 PID: 10509 Comm: syz-executor0 Not tainted 4.17.0-rc6+ #74 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+0x1b9/0x294 lib/dump_stack.c:113 print_circular_bug.isra.36.cold.54+0x1bd/0x27d kernel/locking/lockdep.c:1223 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2417 [inline] __lock_acquire+0x343e/0x5140 kernel/locking/lockdep.c:3431 lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 skb_queue_tail+0x26/0x150 net/core/skbuff.c:2915 unix_dgram_sendmsg+0xf77/0x1730 net/unix/af_unix.c:1797 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 ___sys_sendmsg+0x525/0x940 net/socket.c:2117 __sys_sendmmsg+0x240/0x6f0 net/socket.c:2212 __do_sys_sendmmsg net/socket.c:2241 [inline] __se_sys_sendmmsg net/socket.c:2238 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2238 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007f17f2797c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f17f27986d4 RCX: 0000000000455a09 RDX: fffffffffffffdc3 RSI: 00000000200bd000 RDI: 0000000000000019 RBP: 000000000072bf50 R08: 0000000000000000 R09: 0000000000000000 R10: 5a6d8d97750cae5e R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000005aa R14: 00000000006fd890 R15: 0000000000000001 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 11186 Comm: syz-executor4 Not tainted 4.17.0-rc6+ #74 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+0x1b9/0x294 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x1a lib/fault-inject.c:149 __should_failslab+0x124/0x180 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1522 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3378 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3552 dst_alloc+0xbb/0x1d0 net/core/dst.c:105 rt_dst_alloc+0xfa/0x500 net/ipv4/route.c:1587 __mkroute_output net/ipv4/route.c:2282 [inline] ip_route_output_key_hash_rcu+0xa45/0x3380 net/ipv4/route.c:2509 ip_route_output_key_hash+0x23a/0x390 net/ipv4/route.c:2338 __ip_route_output_key include/net/route.h:124 [inline] ip_route_output_flow+0x28/0xc0 net/ipv4/route.c:2593 udp_sendmsg+0x2014/0x36e0 net/ipv4/udp.c:1072 inet_sendmsg+0x19f/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007f324595bc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f324595c6d4 RCX: 0000000000455a09 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020000100 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 00000000000005d7 R14: 00000000006fdcc8 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 11219 Comm: syz-executor4 Not tainted 4.17.0-rc6+ #74 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+0x1b9/0x294 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x1a lib/fault-inject.c:149 __should_failslab+0x124/0x180 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1522 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc_node mm/slab.c:3299 [inline] kmem_cache_alloc_node+0x272/0x780 mm/slab.c:3642 __alloc_skb+0x111/0x780 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:989 [inline] alloc_skb_with_frags+0x137/0x760 net/core/skbuff.c:5266 sock_alloc_send_pskb+0x87a/0xae0 net/core/sock.c:2095 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2112 __ip_append_data.isra.47+0x15d2/0x2a60 net/ipv4/ip_output.c:978 ip_make_skb+0x2aa/0x340 net/ipv4/ip_output.c:1501 udp_sendmsg+0x25e2/0x36e0 net/ipv4/udp.c:1101 inet_sendmsg+0x19f/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007f324595bc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f324595c6d4 RCX: 0000000000455a09 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020000100 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 00000000000005d7 R14: 00000000006fdcc8 R15: 0000000000000001 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 11257 Comm: syz-executor4 Not tainted 4.17.0-rc6+ #74 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+0x1b9/0x294 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x1a lib/fault-inject.c:149 __should_failslab+0x124/0x180 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1522 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc_node mm/slab.c:3299 [inline] kmem_cache_alloc_node_trace+0x26f/0x770 mm/slab.c:3661 __do_kmalloc_node mm/slab.c:3681 [inline] __kmalloc_node_track_caller+0x33/0x70 mm/slab.c:3696 __kmalloc_reserve.isra.39+0x3a/0xe0 net/core/skbuff.c:137 __alloc_skb+0x14d/0x780 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:989 [inline] alloc_skb_with_frags+0x137/0x760 net/core/skbuff.c:5266 sock_alloc_send_pskb+0x87a/0xae0 net/core/sock.c:2095 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2112 __ip_append_data.isra.47+0x15d2/0x2a60 net/ipv4/ip_output.c:978 ip_make_skb+0x2aa/0x340 net/ipv4/ip_output.c:1501 udp_sendmsg+0x25e2/0x36e0 net/ipv4/udp.c:1101 inet_sendmsg+0x19f/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007f324595bc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f324595c6d4 RCX: 0000000000455a09 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020000100 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 00000000000005d7 R14: 00000000006fdcc8 R15: 0000000000000002 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 11293 Comm: syz-executor4 Not tainted 4.17.0-rc6+ #74 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+0x1b9/0x294 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x1a lib/fault-inject.c:149 __should_failslab+0x124/0x180 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1522 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3378 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3552 __nf_conntrack_alloc+0x1a9/0x7d0 net/netfilter/nf_conntrack_core.c:1137 init_conntrack+0xebc/0x1500 net/netfilter/nf_conntrack_core.c:1219 resolve_normal_ct net/netfilter/nf_conntrack_core.c:1333 [inline] nf_conntrack_in+0xf05/0x1640 net/netfilter/nf_conntrack_core.c:1416 ipv4_conntrack_local+0x1bc/0x290 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c:172 nf_hook_entry_hookfn include/linux/netfilter.h:119 [inline] nf_hook_slow+0xc2/0x1c0 net/netfilter/core.c:511 nf_hook include/linux/netfilter.h:242 [inline] __ip_local_out+0x559/0xb20 net/ipv4/ip_output.c:113 ip_local_out+0x2d/0x1b0 net/ipv4/ip_output.c:122 ip_send_skb+0x40/0xe0 net/ipv4/ip_output.c:1435 udp_send_skb.isra.38+0x6b7/0x11d0 net/ipv4/udp.c:826 udp_sendmsg+0x264c/0x36e0 net/ipv4/udp.c:1106