BUG: sleeping function called from invalid context at net/core/sock.c:2772 in_atomic(): 1, irqs_disabled(): 0, pid: 21, name: kworker/u4:1 5 locks held by kworker/u4:1/21: #0: ((wq_completion)"%s""netns"){+.+.}, at: [<00000000007907e0>] process_one_work+0xaaf/0x1af0 kernel/workqueue.c:2084 #1: (net_cleanup_work){+.+.}, at: [<0000000060c354ae>] process_one_work+0xb01/0x1af0 kernel/workqueue.c:2088 #2: (net_sem){++++}, at: [<000000005bcd40b0>] cleanup_net+0x23f/0xd20 net/core/net_namespace.c:494 #3: (net_mutex){+.+.}, at: [<0000000073b52d93>] cleanup_net+0xa7d/0xd20 net/core/net_namespace.c:496 #4: (&(&srv->idr_lock)->rlock){+...}, at: [<00000000b01098a8>] spin_lock_bh include/linux/spinlock.h:315 [inline] #4: (&(&srv->idr_lock)->rlock){+...}, at: [<00000000b01098a8>] tipc_topsrv_stop+0x231/0x610 net/tipc/topsrv.c:685 CPU: 1 PID: 21 Comm: kworker/u4:1 Not tainted 4.16.0-rc1+ #231 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:6128 __might_sleep+0x95/0x190 kernel/sched/core.c:6081 lock_sock_nested+0x37/0x110 net/core/sock.c:2772 lock_sock include/net/sock.h:1463 [inline] tipc_release+0x103/0xff0 net/tipc/socket.c:572 xt_connbytes: Forcing CT accounting to be enabled sock_release+0x8d/0x1e0 net/socket.c:594 tipc_topsrv_stop+0x3c0/0x610 net/tipc/topsrv.c:696 tipc_exit_net+0x15/0x40 net/tipc/core.c:96 ops_exit_list.isra.6+0xae/0x150 net/core/net_namespace.c:148 cleanup_net+0x6ba/0xd20 net/core/net_namespace.c:529 process_one_work+0xbbf/0x1af0 kernel/workqueue.c:2113 worker_thread+0x223/0x1990 kernel/workqueue.c:2247 kthread+0x33c/0x400 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:429 audit: type=1400 audit(1519055458.300:21): avc: denied { map } for pid=5422 comm="syz-executor4" path=2F616E6F6E5F6875676570616765202864656C6574656429 dev="hugetlbfs" ino=14918 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:hugetlbfs_t:s0 tclass=file permissive=1 audit: type=1400 audit(1519055458.331:22): avc: denied { name_bind } for pid=5421 comm="syz-executor7" src=20028 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1519055458.331:23): avc: denied { node_bind } for pid=5421 comm="syz-executor7" src=20028 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:node_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1519055458.337:24): avc: denied { name_connect } for pid=5421 comm="syz-executor7" dest=20028 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 dccp_close: ABORT with 8218 bytes unread audit: type=1400 audit(1519055458.658:25): avc: denied { map } for pid=5495 comm="syz-executor3" path="socket:[14023]" dev="sockfs" ino=14023 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=socket permissive=1 openvswitch: netlink: Either Ethernet header or EtherType is required. audit: type=1400 audit(1519055458.915:26): avc: denied { ioctl } for pid=5547 comm="syz-executor0" path="socket:[14081]" dev="sockfs" ino=14081 ioctlcmd=0x8946 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1519055458.968:27): avc: denied { accept } for pid=5562 comm="syz-executor5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 openvswitch: netlink: Either Ethernet header or EtherType is required. openvswitch: netlink: IP tunnel attribute has 4 unknown bytes. xt_cgroup: no path or classid specified audit: type=1400 audit(1519055460.036:28): avc: denied { write } for pid=5814 comm="syz-executor7" path="socket:[15425]" dev="sockfs" ino=15425 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 xt_cgroup: no path or classid specified audit: type=1400 audit(1519055460.296:29): avc: denied { read } for pid=5862 comm="syz-executor4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 TCP: request_sock_TCP: Possible SYN flooding on port 20006. Sending cookies. Check SNMP counters. TCP: request_sock_TCP: Possible SYN flooding on port 20006. Sending cookies. Check SNMP counters. netlink: 'syz-executor4': attribute type 7 has an invalid length. netlink: 'syz-executor4': attribute type 7 has an invalid length. syz-executor3 (5900) used greatest stack depth: 13360 bytes left netlink: 'syz-executor2': attribute type 2 has an invalid length. netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor2': attribute type 2 has an invalid length. netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. ip6t_REJECT: ECHOREPLY is not supported. ip6t_REJECT: ECHOREPLY is not supported. xt_connbytes: Forcing CT accounting to be enabled kernel msg: ebtables bug: please report to author: Valid hook without chain SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1579 sclass=netlink_route_socket pig=6082 comm=syz-executor6 kernel msg: ebtables bug: please report to author: Valid hook without chain DRBG: could not allocate CTR cipher TFM handle: ctr(aes) SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1579 sclass=netlink_route_socket pig=6071 comm=syz-executor6 Cannot find add_set index 0 as target Cannot find add_set index 0 as target sctp: [Deprecated]: syz-executor1 (pid 6190) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor1 (pid 6210) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead x_tables: ip_tables: rpfilter match: used from hooks PREROUTING/OUTPUT, but only valid from PREROUTING x_tables: ip_tables: rpfilter match: used from hooks PREROUTING/OUTPUT, but only valid from PREROUTING BUG: sleeping function called from invalid context at net/core/sock.c:2772 in_atomic(): 1, irqs_disabled(): 0, pid: 21, name: kworker/u4:1 5 locks held by kworker/u4:1/21: #0: ((wq_completion)"%s""netns"){+.+.}, at: [<00000000007907e0>] process_one_work+0xaaf/0x1af0 kernel/workqueue.c:2084 #1: (net_cleanup_work){+.+.}, at: [<0000000060c354ae>] process_one_work+0xb01/0x1af0 kernel/workqueue.c:2088 #2: (net_sem){++++}, at: [<000000005bcd40b0>] cleanup_net+0x23f/0xd20 net/core/net_namespace.c:494 #3: (net_mutex){+.+.}, at: [<0000000073b52d93>] cleanup_net+0xa7d/0xd20 net/core/net_namespace.c:496 #4: (&(&srv->idr_lock)->rlock){+...}, at: [<00000000b01098a8>] spin_lock_bh include/linux/spinlock.h:315 [inline] #4: (&(&srv->idr_lock)->rlock){+...}, at: [<00000000b01098a8>] tipc_topsrv_stop+0x231/0x610 net/tipc/topsrv.c:685 CPU: 0 PID: 21 Comm: kworker/u4:1 Tainted: G W 4.16.0-rc1+ #231 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:6128 __might_sleep+0x95/0x190 kernel/sched/core.c:6081 lock_sock_nested+0x37/0x110 net/core/sock.c:2772 lock_sock include/net/sock.h:1463 [inline] tipc_release+0x103/0xff0 net/tipc/socket.c:572 sock_release+0x8d/0x1e0 net/socket.c:594 tipc_topsrv_stop+0x3c0/0x610 net/tipc/topsrv.c:696 tipc_exit_net+0x15/0x40 net/tipc/core.c:96 ops_exit_list.isra.6+0xae/0x150 net/core/net_namespace.c:148 cleanup_net+0x6ba/0xd20 net/core/net_namespace.c:529 process_one_work+0xbbf/0x1af0 kernel/workqueue.c:2113 worker_thread+0x223/0x1990 kernel/workqueue.c:2247 kthread+0x33c/0x400 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:429 kauditd_printk_skb: 5 callbacks suppressed audit: type=1400 audit(1519055462.857:35): avc: denied { ioctl } for pid=6388 comm="syz-executor3" path="socket:[15985]" dev="sockfs" ino=15985 ioctlcmd=0x5411 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 kernel msg: ebtables bug: please report to author: EBT_ENTRY_OR_ENTRIES shouldn't be set in distinguisher netlink: 8 bytes leftover after parsing attributes in process `syz-executor1'. syz-executor0 uses obsolete (PF_INET,SOCK_PACKET) netlink: 8 bytes leftover after parsing attributes in process `syz-executor1'. kernel msg: ebtables bug: please report to author: EBT_ENTRY_OR_ENTRIES shouldn't be set in distinguisher audit: type=1400 audit(1519055463.356:36): avc: denied { connect } for pid=6462 comm="syz-executor3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(1519055463.394:37): avc: denied { getattr } for pid=6465 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(1519055463.408:38): avc: denied { accept } for pid=6462 comm="syz-executor3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(1519055463.426:39): avc: denied { getopt } for pid=6465 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 netlink: 3 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor0'. kernel msg: ebtables bug: please report to author: Valid hook without chain kernel msg: ebtables bug: please report to author: Valid hook without chain audit: type=1400 audit(1519055464.273:40): avc: denied { create } for pid=6611 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_crypto_socket permissive=1 xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables netlink: 16 bytes leftover after parsing attributes in process `syz-executor3'. audit: type=1400 audit(1519055464.624:41): avc: denied { setopt } for pid=6695 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1 netlink: 16 bytes leftover after parsing attributes in process `syz-executor3'. ============================= WARNING: suspicious RCU usage 4.16.0-rc1+ #231 Tainted: G W ----------------------------- ./include/linux/rcupdate.h:302 Illegal context switch in RCU read-side critical section! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by syz-executor3/6776: #0: (rcu_read_lock){....}, at: [<000000002e585c03>] __rds_conn_create+0xe46/0x1b50 net/rds/connection.c:218 stack backtrace: CPU: 0 PID: 6776 Comm: syz-executor3 Tainted: G W 4.16.0-rc1+ #231 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 lockdep_rcu_suspicious+0x123/0x170 kernel/locking/lockdep.c:4592 rcu_preempt_sleep_check include/linux/rcupdate.h:301 [inline] ___might_sleep+0x385/0x470 kernel/sched/core.c:6093 BUG: sleeping function called from invalid context at mm/slab.h:420 __might_sleep+0x95/0x190 kernel/sched/core.c:6081 slab_pre_alloc_hook mm/slab.h:420 [inline] slab_alloc mm/slab.c:3365 [inline] kmem_cache_alloc_trace+0x299/0x740 mm/slab.c:3605 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] rds_loop_conn_alloc+0xc8/0x380 net/rds/loop.c:126 in_atomic(): 1, irqs_disabled(): 0, pid: 6793, name: syz-executor3 1 lock held by syz-executor3/6793: __rds_conn_create+0x112f/0x1b50 net/rds/connection.c:227 #0: ( rcu_read_lock ){....} , at: [<000000002e585c03>] __rds_conn_create+0xe46/0x1b50 net/rds/connection.c:218 rds_conn_create_outgoing+0x3f/0x50 net/rds/connection.c:309 rds_sendmsg+0xe63/0x2550 net/rds/send.c:1153 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xca/0x110 net/socket.c:639 SYSC_sendto+0x361/0x5c0 net/socket.c:1748 SyS_sendto+0x40/0x50 net/socket.c:1716 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453d69 RSP: 002b:00007fdf6ffcac68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fdf6ffcb6d4 RCX: 0000000000453d69 RDX: 0000000000000001 RSI: 00000000203edfff RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020dfcff0 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004b9 R14: 00000000006f71f8 R15: 0000000000000000 CPU: 1 PID: 6793 Comm: syz-executor3 Tainted: G W 4.16.0-rc1+ #231 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:6128 __might_sleep+0x95/0x190 kernel/sched/core.c:6081 slab_pre_alloc_hook mm/slab.h:420 [inline] slab_alloc mm/slab.c:3365 [inline] kmem_cache_alloc_trace+0x299/0x740 mm/slab.c:3605 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] rds_loop_conn_alloc+0xc8/0x380 net/rds/loop.c:126 __rds_conn_create+0x112f/0x1b50 net/rds/connection.c:227 rds_conn_create_outgoing+0x3f/0x50 net/rds/connection.c:309 rds_sendmsg+0xe63/0x2550 net/rds/send.c:1153 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xca/0x110 net/socket.c:639 SYSC_sendto+0x361/0x5c0 net/socket.c:1748 SyS_sendto+0x40/0x50 net/socket.c:1716 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453d69 RSP: 002b:00007fdf6ffa9c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fdf6ffaa6d4 RCX: 0000000000453d69 RDX: 0000000000000480 RSI: 0000000020fc2000 RDI: 0000000000000013 RBP: 000000000072bf58 R08: 000000002069affb R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004b9 R14: 00000000006f71f8 R15: 0000000000000001 netlink: 'syz-executor3': attribute type 26 has an invalid length. netlink: 'syz-executor3': attribute type 26 has an invalid length. x_tables: ip6_tables: rpfilter match: used from hooks FORWARD, but only valid from PREROUTING x_tables: ip6_tables: rpfilter match: used from hooks FORWARD, but only valid from PREROUTING sctp: [Deprecated]: syz-executor7 (pid 6916) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 11 bytes leftover after parsing attributes in process `syz-executor2'. ====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #231 Tainted: G W ------------------------------------------------------ syz-executor0/6919 is trying to acquire lock: (&(&srv->idr_lock)->rlock){+...}, at: [<000000009e462e78>] spin_lock_bh include/linux/spinlock.h:315 [inline] (&(&srv->idr_lock)->rlock){+...}, at: [<000000009e462e78>] tipc_conn_lookup+0x1f/0x90 net/tipc/topsrv.c:225 but task is already holding lock: (&(&sub->lock)->rlock){+...}, at: [<000000004f248d2d>] spin_lock include/linux/spinlock.h:310 [inline] (&(&sub->lock)->rlock){+...}, at: [<000000004f248d2d>] tipc_sub_report_overlap+0x3ce/0x4f0 net/tipc/subscr.c:97 which lock already depends on the new lock. sctp: [Deprecated]: syz-executor7 (pid 6922) Use of int in maxseg socket option. Use struct sctp_assoc_value instead the existing dependency chain (in reverse order) is: -> #4 (&(&sub->lock)->rlock){+...}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:310 [inline] tipc_sub_report_overlap+0x3ce/0x4f0 net/tipc/subscr.c:97 tipc_nameseq_insert_publ net/tipc/name_table.c:329 [inline] tipc_nametbl_insert_publ+0xf1c/0x1850 net/tipc/name_table.c:489 tipc_nametbl_publish+0x2aa/0x4f0 net/tipc/name_table.c:762 tipc_sk_publish+0x1f5/0x4b0 net/tipc/socket.c:2600 tipc_sk_join net/tipc/socket.c:2770 [inline] tipc_setsockopt+0x5fd/0xcf0 net/tipc/socket.c:2874 SYSC_setsockopt net/socket.c:1850 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1829 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b -> #3 (&(&nseq->lock)->rlock){+...}: __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:168 spin_lock_bh include/linux/spinlock.h:315 [inline] tipc_nametbl_insert_publ+0x2da/0x1850 net/tipc/name_table.c:488 tipc_nametbl_publish+0x2aa/0x4f0 net/tipc/name_table.c:762 tipc_sk_publish+0x1f5/0x4b0 net/tipc/socket.c:2600 tipc_bind+0x1a9/0x2d0 net/tipc/socket.c:647 kernel_bind+0x62/0x80 net/socket.c:3128 tipc_topsrv_create_listener net/tipc/topsrv.c:531 [inline] tipc_topsrv_start+0x9ab/0x1010 net/tipc/topsrv.c:671 tipc_init_net+0x3cc/0x570 net/tipc/core.c:74 ops_init+0xec/0x500 net/core/net_namespace.c:124 __register_pernet_operations net/core/net_namespace.c:926 [inline] register_pernet_operations+0x45e/0xa00 net/core/net_namespace.c:1000 register_pernet_subsys+0x28/0x40 net/core/net_namespace.c:1046 tipc_init+0x83/0x104 net/tipc/core.c:136 do_one_initcall+0xad/0x357 init/main.c:832 do_initcall_level init/main.c:898 [inline] do_initcalls init/main.c:906 [inline] do_basic_setup init/main.c:924 [inline] kernel_init_freeable+0x469/0x521 init/main.c:1072 kernel_init+0x13/0x180 init/main.c:999 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:429 -> #2 (&(&tn->nametbl_lock)->rlock){+...}: __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:168 spin_lock_bh include/linux/spinlock.h:315 [inline] tipc_nametbl_publish+0x1ff/0x4f0 net/tipc/name_table.c:754 tipc_sk_publish+0x1f5/0x4b0 net/tipc/socket.c:2600 tipc_bind+0x1a9/0x2d0 net/tipc/socket.c:647 kernel_bind+0x62/0x80 net/socket.c:3128 tipc_topsrv_create_listener net/tipc/topsrv.c:531 [inline] tipc_topsrv_start+0x9ab/0x1010 net/tipc/topsrv.c:671 tipc_init_net+0x3cc/0x570 net/tipc/core.c:74 ops_init+0xec/0x500 net/core/net_namespace.c:124 __register_pernet_operations net/core/net_namespace.c:926 [inline] register_pernet_operations+0x45e/0xa00 net/core/net_namespace.c:1000 register_pernet_subsys+0x28/0x40 net/core/net_namespace.c:1046 tipc_init+0x83/0x104 net/tipc/core.c:136 do_one_initcall+0xad/0x357 init/main.c:832 do_initcall_level init/main.c:898 [inline] do_initcalls init/main.c:906 [inline] do_basic_setup init/main.c:924 [inline] kernel_init_freeable+0x469/0x521 init/main.c:1072 kernel_init+0x13/0x180 init/main.c:999 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:429 -> #1 (k-sk_lock-AF_TIPC){+.+.}: lock_sock_nested+0xc2/0x110 net/core/sock.c:2781 lock_sock include/net/sock.h:1463 [inline] tipc_release+0x103/0xff0 net/tipc/socket.c:572 sock_release+0x8d/0x1e0 net/socket.c:594 tipc_topsrv_stop+0x3c0/0x610 net/tipc/topsrv.c:696 tipc_exit_net+0x15/0x40 net/tipc/core.c:96 ops_exit_list.isra.6+0xae/0x150 net/core/net_namespace.c:148 cleanup_net+0x6ba/0xd20 net/core/net_namespace.c:529 process_one_work+0xbbf/0x1af0 kernel/workqueue.c:2113 worker_thread+0x223/0x1990 kernel/workqueue.c:2247 kthread+0x33c/0x400 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:429 -> #0 (&(&srv->idr_lock)->rlock){+...}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:168 spin_lock_bh include/linux/spinlock.h:315 [inline] tipc_conn_lookup+0x1f/0x90 net/tipc/topsrv.c:225 tipc_topsrv_queue_evt+0x225/0x6d0 net/tipc/topsrv.c:326 tipc_sub_send_event+0x250/0x440 net/tipc/subscr.c:54 tipc_sub_report_overlap+0x3f6/0x4f0 net/tipc/subscr.c:98 tipc_nameseq_insert_publ net/tipc/name_table.c:329 [inline] tipc_nametbl_insert_publ+0xf1c/0x1850 net/tipc/name_table.c:489 tipc_nametbl_publish+0x2aa/0x4f0 net/tipc/name_table.c:762 tipc_sk_publish+0x1f5/0x4b0 net/tipc/socket.c:2600 tipc_sk_join net/tipc/socket.c:2770 [inline] tipc_setsockopt+0x5fd/0xcf0 net/tipc/socket.c:2874 SYSC_setsockopt net/socket.c:1850 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1829 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b other info that might help us debug this: Chain exists of: &(&srv->idr_lock)->rlock --> &(&nseq->lock)->rlock --> &(&sub->lock)->rlock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&sub->lock)->rlock); lock(&(&nseq->lock)->rlock); lock(&(&sub->lock)->rlock); lock(&(&srv->idr_lock)->rlock); *** DEADLOCK *** 4 locks held by syz-executor0/6919: #0: (sk_lock-AF_TIPC){+.+.}, at: [<000000004130cc80>] lock_sock include/net/sock.h:1463 [inline] #0: (sk_lock-AF_TIPC){+.+.}, at: [<000000004130cc80>] tipc_setsockopt+0x13f/0xcf0 net/tipc/socket.c:2847 #1: (&(&tn->nametbl_lock)->rlock){+...}, at: [<0000000029a08504>] spin_lock_bh include/linux/spinlock.h:315 [inline] #1: (&(&tn->nametbl_lock)->rlock){+...}, at: [<0000000029a08504>] tipc_nametbl_publish+0x1ff/0x4f0 net/tipc/name_table.c:754 #2: (&(&nseq->lock)->rlock){+...}, at: [<00000000efc8f54c>] spin_lock_bh include/linux/spinlock.h:315 [inline] #2: (&(&nseq->lock)->rlock){+...}, at: [<00000000efc8f54c>] tipc_nametbl_insert_publ+0x2da/0x1850 net/tipc/name_table.c:488 #3: (&(&sub->lock)->rlock){+...}, at: [<000000004f248d2d>] spin_lock include/linux/spinlock.h:310 [inline] #3: (&(&sub->lock)->rlock){+...}, at: [<000000004f248d2d>] tipc_sub_report_overlap+0x3ce/0x4f0 net/tipc/subscr.c:97 stack backtrace: CPU: 0 PID: 6919 Comm: syz-executor0 Tainted: G W 4.16.0-rc1+ #231 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_circular_bug.isra.38+0x2cd/0x2dc 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+0x30a8/0x3e00 kernel/locking/lockdep.c:3431 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:168 spin_lock_bh include/linux/spinlock.h:315 [inline] tipc_conn_lookup+0x1f/0x90 net/tipc/topsrv.c:225 tipc_topsrv_queue_evt+0x225/0x6d0 net/tipc/topsrv.c:326 tipc_sub_send_event+0x250/0x440 net/tipc/subscr.c:54 tipc_sub_report_overlap+0x3f6/0x4f0 net/tipc/subscr.c:98 tipc_nameseq_insert_publ net/tipc/name_table.c:329 [inline] tipc_nametbl_insert_publ+0xf1c/0x1850 net/tipc/name_table.c:489 tipc_nametbl_publish+0x2aa/0x4f0 net/tipc/name_table.c:762 tipc_sk_publish+0x1f5/0x4b0 net/tipc/socket.c:2600 tipc_sk_join net/tipc/socket.c:2770 [inline] tipc_setsockopt+0x5fd/0xcf0 net/tipc/socket.c:2874 SYSC_setsockopt net/socket.c:1850 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1829 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453d69 RSP: 002b:00007ff6a7299c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007ff6a729a6d4 RCX: 0000000000453d69 RDX: 0000000000000087 RSI: 000000000000010f RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020265000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000005a6 R14: 00000000006f8830 R15: 0000000000000000 netlink: 16 bytes leftover after parsing attributes in process `syz-executor1'. xt_physdev: using --physdev-out and --physdev-is-out are only supported in the FORWARD and POSTROUTING chains with bridged traffic. netlink: 16 bytes leftover after parsing attributes in process `syz-executor1'. xt_physdev: using --physdev-out and --physdev-is-out are only supported in the FORWARD and POSTROUTING chains with bridged traffic. audit: type=1400 audit(1519055467.274:42): avc: denied { net_bind_service } for pid=7027 comm="syz-executor3" capability=10 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519055467.300:43): avc: denied { bind } for pid=7015 comm="syz-executor4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 xt_l2tp: wrong L2TP version: 0 xt_l2tp: wrong L2TP version: 0 audit: type=1400 audit(1519055467.719:44): avc: denied { bind } for pid=7192 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1