====================================================== WARNING: possible circular locking dependency detected 4.19.195-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:6/9364 is trying to acquire lock: 00000000ab0049fa ((wq_completion)"events"){+.+.}, at: flush_workqueue+0xe8/0x13e0 kernel/workqueue.c:2658 but task is already holding lock: 0000000019154116 (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 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. 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:6/9364: #0: 0000000001423dfd ((wq_completion)"%s""netns"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 #1: 00000000885e1f30 (net_cleanup_work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 #2: 0000000019154116 (pernet_ops_rwsem){++++}, at: cleanup_net+0xa8/0x8b0 net/core/net_namespace.c:520 stack backtrace: CPU: 0 PID: 9364 Comm: kworker/u4:6 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 netlink: 4096 bytes leftover after parsing attributes in process `syz-executor.4'. (unnamed net_device) (uninitialized): up delay (511) is not a multiple of miimon (9), updelay rounded to 504 ms overlayfs: failed to resolve './file1': -2 audit: type=1326 audit(1624954225.175:9): auid=4294967295 uid=0 gid=0 ses=4294967295 subj==unconfined pid=14356 comm="syz-executor.3" exe="/root/syz-executor.3" sig=9 arch=c000003e syscall=231 compat=0 ip=0x4665d9 code=0x0 overlayfs: failed to resolve './file1': -2 overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. audit: type=1804 audit(1624954225.175:10): pid=14359 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.0" name="/root/syzkaller-testdir603026464/syzkaller.k9rJaA/270/bus/file0" dev="sda1" ino=14315 res=1 nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead. audit: type=1326 audit(1624954225.905:11): auid=4294967295 uid=0 gid=0 ses=4294967295 subj==unconfined pid=14356 comm="syz-executor.3" exe="/root/syz-executor.3" sig=9 arch=c000003e syscall=231 compat=0 ip=0x4665d9 code=0x0 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1624954226.415:12): pid=14493 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir678349370/syzkaller.wjIXs5/272/file0/file0" dev="loop3" ino=17 res=1 audit: type=1804 audit(1624954226.485:13): pid=14511 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir678349370/syzkaller.wjIXs5/272/file0/file0" dev="loop3" ino=17 res=1 overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: lowerdir is in-use as upperdir/workdir of another mount, mount with '-o index=off' to override exclusive upperdir protection. overlayfs: failed to resolve './file1': -2 ieee80211 phy14: Selected rate control algorithm 'minstrel_ht' ieee80211 phy15: Selected rate control algorithm 'minstrel_ht' IPVS: ftp: loaded support on port[0] = 21 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): Unrecognized mount option "Γ6%o+[J j*ʵ _Ù klz" or missing value audit: type=1804 audit(1624954227.085:14): pid=14542 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir678349370/syzkaller.wjIXs5/273/file0/file0" dev="loop3" ino=17 res=1 EXT4-fs (loop4): Unrecognized mount option "Γ6%o+[J j*ʵ _Ù klz" or missing value ieee80211 phy16: Selected rate control algorithm 'minstrel_ht' EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue IPVS: ftp: loaded support on port[0] = 21 audit: type=1804 audit(1624954227.535:15): pid=14601 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir678349370/syzkaller.wjIXs5/274/file0/file0" dev="sda1" ino=14330 res=1 ieee80211 phy17: Selected rate control algorithm 'minstrel_ht' nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. ieee80211 phy18: Selected rate control algorithm 'minstrel_ht' ieee80211 phy19: Selected rate control algorithm 'minstrel_ht' serio: Serial port pts0 VFS: unable to find oldfs superblock on device loop2 ieee80211 phy20: Selected rate control algorithm 'minstrel_ht' FAT-fs (loop3): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) vhci_hcd vhci_hcd.0: pdev(3) rhport(0) sockfd(10) vhci_hcd vhci_hcd.0: devid(0) speed(1) speed_str(low-speed) vhci_hcd vhci_hcd.0: Device attached vhci_hcd: connection closed vhci_hcd: stop threads vhci_hcd: release socket vhci_hcd: disconnect device IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 ieee80211 phy21: Selected rate control algorithm 'minstrel_ht' IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 vhci_hcd vhci_hcd.0: pdev(3) rhport(1) sockfd(9) vhci_hcd vhci_hcd.0: devid(0) speed(1) speed_str(low-speed) vhci_hcd vhci_hcd.0: Device attached vhci_hcd: connection closed vhci_hcd: stop threads vhci_hcd: release socket vhci_hcd: disconnect device ieee80211 phy22: Selected rate control algorithm 'minstrel_ht' audit: type=1800 audit(1624954232.835:16): pid=14982 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.3" name="bus" dev="sda1" ino=14358 res=0 audit: type=1800 audit(1624954232.835:17): pid=15003 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.3" name="bus" dev="sda1" ino=14358 res=0 ieee80211 phy23: Selected rate control algorithm 'minstrel_ht' ieee80211 phy24: Selected rate control algorithm 'minstrel_ht'