====================================================== WARNING: possible circular locking dependency detected 4.19.195-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:1/23 is trying to acquire lock: 00000000b970c3fe ((wq_completion)"events"){+.+.}, at: flush_workqueue+0xe8/0x13e0 kernel/workqueue.c:2658 but task is already holding lock: 000000003a2d8647 (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 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:1/23: #0: 00000000f4f7ad11 ((wq_completion)"%s""netns"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 #1: 00000000e46cd6d7 (net_cleanup_work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 #2: 000000003a2d8647 (pernet_ops_rwsem){++++}, at: cleanup_net+0xa8/0x8b0 net/core/net_namespace.c:520 stack backtrace: CPU: 0 PID: 23 Comm: kworker/u4:1 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=1800 audit(1624891837.784:9536): pid=10903 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14015 res=0 netlink: 6 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 6 bytes leftover after parsing attributes in process `syz-executor.4'. audit: type=1800 audit(1624891837.995:9537): pid=10921 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14026 res=0 audit: type=1800 audit(1624891839.225:9538): pid=10935 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14050 res=0 EXT4-fs (loop2): VFS: Can't find ext4 filesystem audit: type=1800 audit(1624891839.415:9539): pid=10950 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14050 res=0 audit: type=1800 audit(1624891839.595:9540): pid=10967 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14042 res=0 EXT4-fs (loop2): VFS: Can't find ext4 filesystem netlink: 'syz-executor.4': attribute type 10 has an invalid length. netlink: 'syz-executor.4': attribute type 10 has an invalid length. bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state audit: type=1800 audit(1624891839.815:9541): pid=10990 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14046 res=0 device team0 entered promiscuous mode IPVS: set_ctl: invalid protocol: 135 224.0.0.2:20003 device team_slave_0 entered promiscuous mode block nbd1: NBD_DISCONNECT device team_slave_1 entered promiscuous mode block nbd1: Send disconnect failed -32 bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered forwarding state x_tables: eb_tables: AUDIT.0 target: invalid size 8 (kernel) != (user) 0 block nbd1: Disconnected due to user request. block nbd1: shutting down sockets IPVS: set_ctl: invalid protocol: 135 224.0.0.2:20003 netlink: 'syz-executor.4': attribute type 10 has an invalid length. device team0 left promiscuous mode device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state netlink: 'syz-executor.4': attribute type 10 has an invalid length. block nbd1: NBD_DISCONNECT bridge0: port 3(team0) entered blocking state block nbd1: Send disconnect failed -32 bridge0: port 3(team0) entered disabled state block nbd1: Disconnected due to user request. device team0 entered promiscuous mode block nbd1: shutting down sockets device team_slave_0 entered promiscuous mode device team_slave_1 entered promiscuous mode bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered forwarding state EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue netlink: 4 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 'syz-executor.3': attribute type 29 has an invalid length. netlink: 'syz-executor.1': attribute type 18 has an invalid length. netlink: 'syz-executor.1': attribute type 15 has an invalid length. netlink: 'syz-executor.3': attribute type 29 has an invalid length. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 'syz-executor.3': attribute type 29 has an invalid length. netlink: 'syz-executor.3': attribute type 29 has an invalid length. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue FAT-fs (loop2): Unrecognized mount option "nfs=nosta" or missing value netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor.4'. FAT-fs (loop2): Unrecognized mount option "nfs=nosta" or missing value EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. audit: type=1800 audit(1624891841.485:9542): pid=11158 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.2" name="file0" dev="sda1" ino=14065 res=0 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue overlayfs: unrecognized mount option "nowy% "Oerfi=.:fiRbl2Z$D{9bT냖%̞1" or missing value nla_parse: 7 callbacks suppressed netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. overlayfs: unrecognized mount option "nowy% "Oerfi=.:fiRbl2Z$D{9bT냖%̞1" or missing value netlink: 5 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue netlink: 4 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue netlink: 4 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor.0'. EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1624891844.916:9543): pid=11490 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir363366368/syzkaller.hMSyvv/31/cgroup.controllers" dev="sda1" ino=14084 res=1 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue xt_hashlimit: overflow, try lower: 0/0 xt_hashlimit: overflow, try lower: 0/0 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue xt_hashlimit: overflow, try lower: 0/0 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue