====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ kworker/0:63/25368 is trying to acquire lock: 00000000ed8069d7 (&sb->s_type->i_mutex_key#10){++++}, at: inode_lock include/linux/fs.h:748 [inline] 00000000ed8069d7 (&sb->s_type->i_mutex_key#10){++++}, at: __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:989 but task is already holding lock: 0000000018fc9502 ((work_completion)(&dio->complete_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 ((work_completion)(&dio->complete_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)"dio/%s"sb->s_id){+.+.}: drain_workqueue+0x1a5/0x460 kernel/workqueue.c:2826 destroy_workqueue+0x75/0x790 kernel/workqueue.c:4183 __alloc_workqueue_key+0xb76/0xed0 kernel/workqueue.c:4160 sb_init_dio_done_wq+0x34/0x90 fs/direct-io.c:623 do_blockdev_direct_IO fs/direct-io.c:1285 [inline] __blockdev_direct_IO+0x5f55/0xef40 fs/direct-io.c:1419 ext4_direct_IO_write fs/ext4/inode.c:3777 [inline] ext4_direct_IO+0xae4/0x1c50 fs/ext4/inode.c:3915 generic_file_direct_write+0x208/0x4a0 mm/filemap.c:3073 __generic_file_write_iter+0x2d0/0x610 mm/filemap.c:3252 ext4_file_write_iter+0x957/0xf20 fs/ext4/file.c:272 call_write_iter include/linux/fs.h:1821 [inline] aio_write+0x37f/0x5c0 fs/aio.c:1574 __io_submit_one fs/aio.c:1858 [inline] io_submit_one+0xecd/0x20c0 fs/aio.c:1909 __do_sys_io_submit fs/aio.c:1953 [inline] __se_sys_io_submit+0x11b/0x4a0 fs/aio.c:1924 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&sb->s_type->i_mutex_key#10){++++}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:989 ext4_sync_file+0xa35/0x1420 fs/ext4/fsync.c:118 vfs_fsync_range+0x13a/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2750 [inline] dio_complete+0x763/0xac0 fs/direct-io.c:329 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: &sb->s_type->i_mutex_key#10 --> (wq_completion)"dio/%s"sb->s_id --> (work_completion)(&dio->complete_work) Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&dio->complete_work)); lock((wq_completion)"dio/%s"sb->s_id); lock((work_completion)(&dio->complete_work)); lock(&sb->s_type->i_mutex_key#10); *** DEADLOCK *** 2 locks held by kworker/0:63/25368: #0: 00000000852df3ed ((wq_completion)"dio/%s"sb->s_id){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 overlayfs: unrecognized mount option "uppkdir=./file1" or missing value #1: 0000000018fc9502 ((work_completion)(&dio->complete_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 stack backtrace: CPU: 0 PID: 25368 Comm: kworker/0:63 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Workqueue: dio/sda1 dio_aio_complete_work 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 inode_lock include/linux/fs.h:748 [inline] __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:989 ext4_sync_file+0xa35/0x1420 fs/ext4/fsync.c:118 vfs_fsync_range+0x13a/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2750 [inline] dio_complete+0x763/0xac0 fs/direct-io.c:329 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 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 overlayfs: unrecognized mount option "uppkdir=./file1" or missing value audit: type=1800 audit(1664755932.067:582): pid=27247 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=15277 res=0 f2fs_msg: 54 callbacks suppressed F2FS-fs (loop4): Mounted with checkpoint version = 3e17dab1 F2FS-fs (loop3): Mounted with checkpoint version = 3e17dab1 F2FS-fs (loop2): Mounted with checkpoint version = 3e17dab1 audit: type=1800 audit(1664755932.257:583): pid=27264 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="file0" dev="sda1" ino=15277 res=0 overlayfs: unrecognized mount option "uppkdir=./file1" or missing value F2FS-fs (loop4): Mismatch start address, segment0(402654208) cp_blkaddr(1024) F2FS-fs (loop3): Mismatch start address, segment0(402654208) cp_blkaddr(1024) F2FS-fs (loop3): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop4): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop3): Found nat_bits in checkpoint F2FS-fs (loop4): Found nat_bits in checkpoint F2FS-fs (loop2): Mismatch start address, segment0(402654208) cp_blkaddr(1024) attempt to access beyond end of device loop4: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop4: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop3: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop4: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop4: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 audit: type=1800 audit(1664755934.728:584): pid=27613 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15268 res=0 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 audit: type=1800 audit(1664755935.068:585): pid=27653 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15297 res=0 audit: type=1800 audit(1664755935.088:586): pid=27653 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15297 res=0 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 audit: type=1800 audit(1664755935.318:587): pid=27686 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=15293 res=0 audit: type=1800 audit(1664755935.358:588): pid=27661 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="file0" dev="sda1" ino=15293 res=0 audit: type=1800 audit(1664755935.538:589): pid=27710 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15305 res=0 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 attempt to access beyond end of device audit: type=1800 audit(1664755935.538:590): pid=27710 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15305 res=0 loop2: rw=0, want=65552, limit=65548 audit: type=1800 audit(1664755935.538:591): pid=27710 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15305 res=0 audit: type=1800 audit(1664755935.538:592): pid=27710 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15305 res=0 audit: type=1800 audit(1664755935.538:593): pid=27710 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.0" name="file0" dev="sda1" ino=15305 res=0 attempt to access beyond end of device loop4: rw=0, want=65552, limit=65548 team0: Device ipvlan1 failed to register rx_handler attempt to access beyond end of device loop4: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop3: rw=0, want=65552, limit=65548 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 f2fs_msg: 139 callbacks suppressed F2FS-fs (loop3): Found nat_bits in checkpoint team0: Device ipvlan1 failed to register rx_handler F2FS-fs (loop3): Mounted with checkpoint version = 3e17dab1 attempt to access beyond end of device loop2: rw=0, want=65552, limit=65548 team0: Device ipvlan1 failed to register rx_handler F2FS-fs (loop3): Mismatch start address, segment0(402654208) cp_blkaddr(1024) F2FS-fs (loop2): Mismatch start address, segment0(402654208) cp_blkaddr(1024) F2FS-fs (loop3): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop2): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop4): Mismatch start address, segment0(402654208) cp_blkaddr(1024) F2FS-fs (loop3): Found nat_bits in checkpoint F2FS-fs (loop4): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop2): Found nat_bits in checkpoint syz-executor.5 (27986) used greatest stack depth: 22792 bytes left ieee80211 ©,í…×;qO!: Selected rate control algorithm 'minstrel_ht' sysfs: cannot create duplicate filename '/class/ieee80211/©,í…×;qO!' CPU: 1 PID: 28130 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 sysfs_warn_dup.cold+0x1c/0x29 fs/sysfs/dir.c:30 sysfs_do_create_link_sd+0x116/0x130 fs/sysfs/symlink.c:50 sysfs_do_create_link fs/sysfs/symlink.c:79 [inline] sysfs_create_link+0x5f/0xc0 fs/sysfs/symlink.c:91 device_add_class_symlinks drivers/base/core.c:1934 [inline] device_add+0x7d1/0x16d0 drivers/base/core.c:2136 wiphy_register+0x1664/0x2130 net/wireless/core.c:832 ieee80211_register_hw+0x13be/0x3550 net/mac80211/main.c:1106 mac80211_hwsim_new_radio+0x1d3f/0x3c60 drivers/net/wireless/mac80211_hwsim.c:2896 hwsim_new_radio_nl+0x5c3/0x850 drivers/net/wireless/mac80211_hwsim.c:3374 genl_family_rcv_msg+0x642/0xc40 net/netlink/genetlink.c:602 genl_rcv_msg+0xbf/0x160 net/netlink/genetlink.c:627 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 genl_rcv+0x24/0x40 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f79d6a7e5a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f79d53f2168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f79d6b9ff80 RCX: 00007f79d6a7e5a9 RDX: 0000000000000000 RSI: 0000000020000400 RDI: 0000000000000004 RBP: 00007f79d6ad9580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd04522ecf R14: 00007f79d53f2300 R15: 0000000000022000 attempt to access beyond end of device loop4: rw=0, want=65552, limit=65548 ieee80211 ©,í…×;qO!: Selected rate control algorithm 'minstrel_ht' sysfs: cannot create duplicate filename '/class/ieee80211/©,í…×;qO!' CPU: 1 PID: 28241 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 sysfs_warn_dup.cold+0x1c/0x29 fs/sysfs/dir.c:30 sysfs_do_create_link_sd+0x116/0x130 fs/sysfs/symlink.c:50 sysfs_do_create_link fs/sysfs/symlink.c:79 [inline] sysfs_create_link+0x5f/0xc0 fs/sysfs/symlink.c:91 device_add_class_symlinks drivers/base/core.c:1934 [inline] device_add+0x7d1/0x16d0 drivers/base/core.c:2136 wiphy_register+0x1664/0x2130 net/wireless/core.c:832 ieee80211_register_hw+0x13be/0x3550 net/mac80211/main.c:1106 mac80211_hwsim_new_radio+0x1d3f/0x3c60 drivers/net/wireless/mac80211_hwsim.c:2896 hwsim_new_radio_nl+0x5c3/0x850 drivers/net/wireless/mac80211_hwsim.c:3374 genl_family_rcv_msg+0x642/0xc40 net/netlink/genetlink.c:602 genl_rcv_msg+0xbf/0x160 net/netlink/genetlink.c:627 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 genl_rcv+0x24/0x40 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f79d6a7e5a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f79d53f2168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f79d6b9ff80 RCX: 00007f79d6a7e5a9 RDX: 0000000000000000 RSI: 0000000020000400 RDI: 0000000000000004 RBP: 00007f79d6ad9580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd04522ecf R14: 00007f79d53f2300 R15: 0000000000022000 sysfs: cannot create duplicate filename '/class/ieee80211/©,í…×;qO!' CPU: 0 PID: 28259 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 sysfs_warn_dup.cold+0x1c/0x29 fs/sysfs/dir.c:30 sysfs_do_create_link_sd+0x116/0x130 fs/sysfs/symlink.c:50 sysfs_do_create_link fs/sysfs/symlink.c:79 [inline] sysfs_create_link+0x5f/0xc0 fs/sysfs/symlink.c:91 device_add_class_symlinks drivers/base/core.c:1934 [inline] device_add+0x7d1/0x16d0 drivers/base/core.c:2136 wiphy_register+0x1664/0x2130 net/wireless/core.c:832 ieee80211_register_hw+0x13be/0x3550 net/mac80211/main.c:1106 mac80211_hwsim_new_radio+0x1d3f/0x3c60 drivers/net/wireless/mac80211_hwsim.c:2896 hwsim_new_radio_nl+0x5c3/0x850 drivers/net/wireless/mac80211_hwsim.c:3374 genl_family_rcv_msg+0x642/0xc40 net/netlink/genetlink.c:602 genl_rcv_msg+0xbf/0x160 net/netlink/genetlink.c:627 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 genl_rcv+0x24/0x40 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f0ce3fdb5a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0ce294f168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f0ce40fcf80 RCX: 00007f0ce3fdb5a9 RDX: 0000000000000000 RSI: 0000000020000400 RDI: 0000000000000004 RBP: 00007f0ce4036580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc661ab41f R14: 00007f0ce294f300 R15: 0000000000022000