====================================================== WARNING: possible circular locking dependency detected 4.19.195-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:2/37 is trying to acquire lock: 000000000df43320 ((wq_completion)"events"){+.+.}, at: flush_workqueue+0xe8/0x13e0 kernel/workqueue.c:2658 but task is already holding lock: 0000000056e2bb63 (pernet_ops_rwsem){++++}, at: cleanup_net+0xa8/0x8b0 net/core/net_namespace.c:520 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (pernet_ops_rwsem){++++}: unregister_netdevice_notifier+0x7b/0x330 net/core/dev.c:1708 raw_release+0x58/0x820 net/can/raw.c:358 __sock_release+0xcd/0x2a0 net/socket.c:579 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #2 (&sb->s_type->i_mutex_key#13){+.+.}: inode_lock include/linux/fs.h:748 [inline] __sock_release+0x86/0x2a0 net/socket.c:578 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 delayed_fput+0x56/0x70 fs/file_table.c:304 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #1 ((delayed_fput_work).work){+.+.}: worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #0 ((wq_completion)"events"){+.+.}: flush_workqueue+0x117/0x13e0 kernel/workqueue.c:2661 flush_scheduled_work include/linux/workqueue.h:599 [inline] tipc_exit_net+0x38/0x60 net/tipc/core.c:100 ops_exit_list+0xa5/0x150 net/core/net_namespace.c:153 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 EXT4-fs (loop1): error: journal path ./file0 is not a block device kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 other info that might help us debug this: Chain exists of: (wq_completion)"events" --> &sb->s_type->i_mutex_key#13 --> pernet_ops_rwsem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(pernet_ops_rwsem); lock(&sb->s_type->i_mutex_key#13); lock(pernet_ops_rwsem); lock((wq_completion)"events"); *** DEADLOCK *** 3 locks held by kworker/u4:2/37: #0: 000000000022eb4a ((wq_completion)"%s""netns"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 #1: 0000000087db7af6 (net_cleanup_work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 #2: 0000000056e2bb63 (pernet_ops_rwsem){++++}, at: cleanup_net+0xa8/0x8b0 net/core/net_namespace.c:520 stack backtrace: CPU: 0 PID: 37 Comm: kworker/u4:2 Not tainted 4.19.195-syzkaller #0 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:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 flush_workqueue+0x117/0x13e0 kernel/workqueue.c:2661 flush_scheduled_work include/linux/workqueue.h:599 [inline] tipc_exit_net+0x38/0x60 net/tipc/core.c:100 ops_exit_list+0xa5/0x150 net/core/net_namespace.c:153 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 audit: type=1804 audit(1624895703.454:15): pid=10722 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir974736530/syzkaller.0HKmzV/20/cgroup.controllers" dev="sda1" ino=14030 res=1 audit: type=1804 audit(1624895703.584:16): pid=10743 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir541235604/syzkaller.0D9QT3/24/cgroup.controllers" dev="sda1" ino=14034 res=1 md: invalid raid superblock magic on ram96 md: ram96 does not have a valid v0.0 superblock, not importing! md: md_import_device returned -22 sctp: [Deprecated]: syz-executor.0 (pid 10764) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor.0 (pid 10772) Use of int in max_burst socket option. Use struct sctp_assoc_value instead net_ratelimit: 1 callbacks suppressed TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. netlink: 28 bytes leftover after parsing attributes in process `syz-executor.3'. syz-executor.5 (10786) used greatest stack depth: 22848 bytes left print_req_error: I/O error, dev loop7, sector 256 Buffer I/O error on dev loop7, logical block 128, lost async page write print_req_error: I/O error, dev loop7, sector 258 Buffer I/O error on dev loop7, logical block 129, lost async page write print_req_error: I/O error, dev loop7, sector 260 Buffer I/O error on dev loop7, logical block 130, lost async page write print_req_error: I/O error, dev loop7, sector 262 Buffer I/O error on dev loop7, logical block 131, lost async page write netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 28 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1804 audit(1624895704.834:17): pid=10895 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir717193655/syzkaller.y2Tnfs/28/file0" dev="sda1" ino=14052 res=1 audit: type=1804 audit(1624895704.894:18): pid=10895 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir717193655/syzkaller.y2Tnfs/28/file0" dev="sda1" ino=14052 res=1 audit: type=1800 audit(1624895705.244:19): pid=10910 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14060 res=0 audit: type=1800 audit(1624895705.254:20): pid=10910 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14060 res=0 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 audit: type=1800 audit(1624895706.144:21): pid=11036 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="bus" dev="sda1" ino=14067 res=0 nla_parse: 3 callbacks suppressed netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11155): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 syz-executor.3 (11156): drop_caches: 0 batman_adv: batadv0: Interface deactivated: batadv_slave_0 batman_adv: batadv0: Removing interface: batadv_slave_0 batman_adv: batadv0: Interface deactivated: batadv_slave_1 batman_adv: batadv0: Removing interface: batadv_slave_1 device bridge_slave_1 left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state device bridge_slave_0 left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state device veth1_macvtap left promiscuous mode device veth0_macvtap left promiscuous mode device veth1_vlan left promiscuous mode device veth0_vlan left promiscuous mode device hsr_slave_1 left promiscuous mode device hsr_slave_0 left promiscuous mode team0 (unregistering): Port device team_slave_1 removed team0 (unregistering): Port device team_slave_0 removed bond0 (unregistering): Releasing backup interface bond_slave_1 bond0 (unregistering): Releasing backup interface bond_slave_0 bond0 (unregistering): Released all slaves