====================================================== WARNING: possible circular locking dependency detected 4.19.195-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/17964 is trying to acquire lock: 00000000cc0174ad (pernet_ops_rwsem){++++}, at: unregister_netdevice_notifier+0x7b/0x330 net/core/dev.c:1708 but task is already holding lock: 00000000e1f1313a (&sb->s_type->i_mutex_key#13){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] 00000000e1f1313a (&sb->s_type->i_mutex_key#13){+.+.}, at: __sock_release+0x86/0x2a0 net/socket.c:578 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&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 -> #2 ((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 -> #1 ((wq_completion)"events"){+.+.}: 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 -> #0 (pernet_ops_rwsem){++++}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 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 other info that might help us debug this: Chain exists of: pernet_ops_rwsem --> (delayed_fput_work).work --> &sb->s_type->i_mutex_key#13 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#13); lock((delayed_fput_work).work); lock(&sb->s_type->i_mutex_key#13); lock(pernet_ops_rwsem); *** DEADLOCK *** 1 lock held by syz-executor.4/17964: #0: 00000000e1f1313a (&sb->s_type->i_mutex_key#13){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] #0: 00000000e1f1313a (&sb->s_type->i_mutex_key#13){+.+.}, at: __sock_release+0x86/0x2a0 net/socket.c:578 stack backtrace: CPU: 0 PID: 17964 Comm: syz-executor.4 Not tainted 4.19.195-syzkaller #0 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+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 down_write+0x34/0x90 kernel/locking/rwsem.c:70 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 RIP: 0033:0x4193eb Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007fff4b54d8d0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000008 RCX: 00000000004193eb RDX: 0000000000572168 RSI: ffffffff8167a83a RDI: 0000000000000007 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2f323080 R10: 00000000000001ec R11: 0000000000000293 R12: 0000000000052400 R13: 00000000000003e8 R14: 000000000056bf80 R15: 00000000000523c3 netlink: 'syz-executor.5': attribute type 10 has an invalid length. bond0: veth0_to_batadv is up - this may be due to an out of date ifenslave netlink: 'syz-executor.5': attribute type 10 has an invalid length. netlink: 'syz-executor.5': attribute type 10 has an invalid length. bond0: veth0_to_batadv is up - this may be due to an out of date ifenslave bridge0: port 2(bridge_slave_1) entered disabled state bridge0: port 1(bridge_slave_0) entered disabled state SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f audit: type=1800 audit(1624960533.967:51): pid=18038 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.4" name="file1" dev="loop4" ino=5 res=0 EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue netlink: 'syz-executor.2': attribute type 10 has an invalid length. bond0: team0 is up - this may be due to an out of date ifenslave netlink: 'syz-executor.2': attribute type 10 has an invalid length. bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered disabled state device team0 entered promiscuous mode device team_slave_0 entered promiscuous mode SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: squashfs_read_data failed to read block 0x60 SQUASHFS error: Unable to read fragment cache entry [60] SQUASHFS error: Unable to read page, block 60, size 1f device team_slave_1 entered promiscuous mode SQUASHFS error: Unable to read fragment cache entry [60] bridge0: port 3(team0) entered blocking state bridge0: port 3(team0) entered forwarding state SQUASHFS error: Unable to read page, block 60, size 1f netlink: 'syz-executor.2': attribute type 10 has an invalid length. device team0 left promiscuous mode audit: type=1800 audit(1624960535.497:52): pid=18110 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.4" name="file1" dev="loop4" ino=5 res=0 device team_slave_0 left promiscuous mode device team_slave_1 left promiscuous mode bridge0: port 3(team0) entered disabled state bond0: team0 is up - this may be due to an out of date ifenslave bridge0: mtu greater than device maximum bridge0: mtu greater than device maximum netlink: 'syz-executor.5': attribute type 4 has an invalid length. 9pnet: p9_fd_create_tcp (18148): problem connecting socket to 127.0.0.1 9pnet: p9_fd_create_tcp (18159): problem connecting socket to 127.0.0.1 audit: type=1804 audit(1624960536.187:53): pid=18187 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir463935449/syzkaller.lOOvrD/252/bus" dev="sda1" ino=14667 res=1 audit: type=1804 audit(1624960536.287:54): pid=18194 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir463935449/syzkaller.lOOvrD/252/bus" dev="sda1" ino=14667 res=1 netlink: 176 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 176 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 'syz-executor.5': attribute type 4 has an invalid length. UDF-fs: error (device loop4): udf_process_sequence: Primary Volume Descriptor not found! UDF-fs: error (device loop4): udf_process_sequence: Primary Volume Descriptor not found! UDF-fs: Scanning with blocksize 512 failed UDF-fs: warning (device loop4): udf_load_vrs: No anchor found UDF-fs: Scanning with blocksize 1024 failed UDF-fs: warning (device loop4): udf_load_vrs: No anchor found UDF-fs: Scanning with blocksize 2048 failed UDF-fs: warning (device loop4): udf_load_vrs: No VRS found UDF-fs: Scanning with blocksize 4096 failed caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect netlink: 'syz-executor.2': attribute type 2 has an invalid length. netlink: 202696 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 'syz-executor.2': attribute type 2 has an invalid length. netlink: 202696 bytes leftover after parsing attributes in process `syz-executor.2'. EXT4-fs (loop2): couldn't mount RDWR because of unsupported optional features (6ff90000) BTRFS: device fsid f90cac8b-044b-4fa8-8bee-4b8d3da88dc2 devid 1 transid 7 /dev/loop4 BTRFS info (device loop4): disk space caching is enabled BTRFS info (device loop4): has skinny extents attempt to access beyond end of device loop4: rw=4096, want=2064, limit=267 BTRFS error (device loop4): failed to read chunk root BTRFS error (device loop4): open_ctree failed BTRFS info (device loop4): disk space caching is enabled BTRFS info (device loop4): has skinny extents attempt to access beyond end of device loop4: rw=4096, want=2064, limit=267 BTRFS error (device loop4): failed to read chunk root BTRFS error (device loop4): open_ctree failed BTRFS info (device loop4): disk space caching is enabled BTRFS info (device loop4): has skinny extents attempt to access beyond end of device loop4: rw=4096, want=2064, limit=267 BTRFS error (device loop4): failed to read chunk root BTRFS error (device loop4): open_ctree failed BTRFS info (device loop4): disk space caching is enabled BTRFS info (device loop4): has skinny extents attempt to access beyond end of device loop4: rw=4096, want=2064, limit=267 BTRFS error (device loop4): failed to read chunk root BTRFS error (device loop4): open_ctree failed EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue BTRFS info (device loop4): disk space caching is enabled BTRFS info (device loop4): has skinny extents attempt to access beyond end of device loop4: rw=4096, want=2064, limit=267 BTRFS error (device loop4): failed to read chunk root BTRFS error (device loop4): open_ctree failed