overlayfs: 'file0' not a directory ====================================================== WARNING: possible circular locking dependency detected 4.14.259-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/13337 is trying to acquire lock: ("dio/%s"sb->s_id){+.+.}, at: [] flush_workqueue+0xcb/0x1310 kernel/workqueue.c:2622 but task is already holding lock: (&sb->s_type->i_mutex_key#24){++++}, at: [] inode_lock include/linux/fs.h:719 [inline] (&sb->s_type->i_mutex_key#24){++++}, at: [] generic_file_write_iter+0x99/0x650 mm/filemap.c:3205 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&sb->s_type->i_mutex_key#24){++++}: down_write+0x34/0x90 kernel/locking/rwsem.c:54 inode_lock include/linux/fs.h:719 [inline] __generic_file_fsync+0x9e/0x190 fs/libfs.c:989 fat_file_fsync+0x73/0x1f0 fs/fat/file.c:165 vfs_fsync_range+0x103/0x260 fs/sync.c:196 generic_write_sync include/linux/fs.h:2684 [inline] dio_complete+0x561/0x8d0 fs/direct-io.c:330 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #1 ((&dio->complete_work)){+.+.}: process_one_work+0x736/0x14a0 kernel/workqueue.c:2093 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #0 ("dio/%s"sb->s_id){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 __alloc_workqueue_key+0xd50/0x1080 kernel/workqueue.c:4093 sb_init_dio_done_wq+0x34/0x80 fs/direct-io.c:624 do_blockdev_direct_IO fs/direct-io.c:1287 [inline] __blockdev_direct_IO+0x3df1/0xdcb0 fs/direct-io.c:1423 blockdev_direct_IO include/linux/fs.h:2994 [inline] fat_direct_IO+0x19b/0x320 fs/fat/inode.c:275 generic_file_direct_write+0x1df/0x420 mm/filemap.c:2958 __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3137 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3208 call_write_iter include/linux/fs.h:1780 [inline] aio_write+0x2ed/0x560 fs/aio.c:1553 io_submit_one fs/aio.c:1641 [inline] do_io_submit+0x847/0x1570 fs/aio.c:1709 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb other info that might help us debug this: Chain exists of: "dio/%s"sb->s_id --> (&dio->complete_work) --> &sb->s_type->i_mutex_key#24 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#24); lock((&dio->complete_work)); lock(&sb->s_type->i_mutex_key#24); lock("dio/%s"sb->s_id); *** DEADLOCK *** 2 locks held by syz-executor.5/13337: #0: (sb_writers#15){.+.+}, at: [] file_start_write include/linux/fs.h:2714 [inline] #0: (sb_writers#15){.+.+}, at: [] aio_write+0x408/0x560 fs/aio.c:1552 #1: (&sb->s_type->i_mutex_key#24){++++}, at: [] inode_lock include/linux/fs.h:719 [inline] #1: (&sb->s_type->i_mutex_key#24){++++}, at: [] generic_file_write_iter+0x99/0x650 mm/filemap.c:3205 stack backtrace: CPU: 1 PID: 13337 Comm: syz-executor.5 Not tainted 4.14.259-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 audit: type=1800 audit(1640432729.314:119): pid=13335 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=14312 res=0 overlayfs: 'file0' not a directory lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 overlayfs: 'file0' not a directory drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 __alloc_workqueue_key+0xd50/0x1080 kernel/workqueue.c:4093 sb_init_dio_done_wq+0x34/0x80 fs/direct-io.c:624 do_blockdev_direct_IO fs/direct-io.c:1287 [inline] __blockdev_direct_IO+0x3df1/0xdcb0 fs/direct-io.c:1423 blockdev_direct_IO include/linux/fs.h:2994 [inline] fat_direct_IO+0x19b/0x320 fs/fat/inode.c:275 generic_file_direct_write+0x1df/0x420 mm/filemap.c:2958 __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3137 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3208 call_write_iter include/linux/fs.h:1780 [inline] aio_write+0x2ed/0x560 fs/aio.c:1553 io_submit_one fs/aio.c:1641 [inline] do_io_submit+0x847/0x1570 fs/aio.c:1709 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7fc0cee75e99 RSP: 002b:00007fc0cd7ca168 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 00007fc0cef89030 RCX: 00007fc0cee75e99 RDX: 0000000020000540 RSI: 0000000000001801 RDI: 00007fc0cef64000 RBP: 00007fc0ceecfff1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff004769ef R14: 00007fc0cd7ca300 R15: 0000000000022000 overlayfs: fs on 'file0' does not support file handles, falling back to index=off. audit: type=1804 audit(1640432730.384:120): pid=13382 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir886143332/syzkaller.MMwAcP/83/bus" dev="sda1" ino=14264 res=1 audit: type=1800 audit(1640432730.384:121): pid=13382 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=14264 res=0 audit: type=1800 audit(1640432730.464:122): pid=13414 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=14294 res=0 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1804 audit(1640432730.584:123): pid=13414 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir252519990/syzkaller.FXiUE6/67/file0" dev="sda1" ino=14294 res=1 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. 8021q: adding VLAN 0 to HW filter on device batadv1 EXT4-fs (loop5): Unrecognized mount option "B" or missing value FAT-fs (loop1): invalid media value (0x01) overlayfs: unrecognized mount option "xino=off" or missing value FAT-fs (loop1): Can't find a valid FAT filesystem netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1800 audit(1640432730.914:124): pid=13540 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="file0" dev="sda1" ino=14297 res=0 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. EXT4-fs (loop5): Unrecognized mount option "B" or missing value overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: unrecognized mount option "xino=off" or missing value FAT-fs (loop1): invalid media value (0x01) FAT-fs (loop1): Can't find a valid FAT filesystem EXT4-fs (loop5): Unrecognized mount option "B" or missing value overlayfs: unrecognized mount option "xino=off" or missing value print_req_error: I/O error, dev loop1, sector 1 Buffer I/O error on dev loop1, logical block 1, async page read print_req_error: I/O error, dev loop1, sector 2 Buffer I/O error on dev loop1, logical block 2, async page read overlayfs: fs on 'file0' does not support file handles, falling back to index=off. print_req_error: I/O error, dev loop1, sector 3 Buffer I/O error on dev loop1, logical block 3, async page read print_req_error: I/O error, dev loop1, sector 4 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. Buffer I/O error on dev loop1, logical block 4, async page read print_req_error: I/O error, dev loop1, sector 5 overlayfs: fs on './file0' does not support file handles, falling back to index=off. Buffer I/O error on dev loop1, logical block 5, async page read print_req_error: I/O error, dev loop1, sector 6 print_req_error: I/O error, dev loop5, sector 0 Buffer I/O error on dev loop1, logical block 6, async page read Buffer I/O error on dev loop5, logical block 0, async page read print_req_error: I/O error, dev loop1, sector 7 print_req_error: I/O error, dev loop5, sector 4 Buffer I/O error on dev loop1, logical block 7, async page read Buffer I/O error on dev loop5, logical block 2, async page read print_req_error: I/O error, dev loop5, sector 6 Buffer I/O error on dev loop5, logical block 3, async page read EXT4-fs (loop5): Unrecognized mount option "B" or missing value netlink: 4 bytes leftover after parsing attributes in process `syz-executor.2'. overlayfs: 'file0' not a directory EXT4-fs (loop5): Unrecognized mount option "B" or missing value overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory netlink: 16 bytes leftover after parsing attributes in process `syz-executor.3'. overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory EXT4-fs (loop5): Unrecognized mount option "B" or missing value overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory EXT4-fs (loop5): Unrecognized mount option "B" or missing value overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory EXT4-fs (loop5): Unrecognized mount option "B" or missing value overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory overlayfs: 'file0' not a directory EXT4-fs (loop5): Unrecognized mount option "B" or missing value EXT4-fs (loop5): Unrecognized mount option "B" or missing value overlayfs: fs on './file0' does not support file handles, falling back to index=off. EXT4-fs (loop5): Unrecognized mount option "B" or missing value EXT4-fs (loop5): Unrecognized mount option "B" or missing value FAT-fs (loop1): invalid media value (0x01) FAT-fs (loop1): Can't find a valid FAT filesystem MINIX-fs: mounting unchecked file system, running fsck is recommended netlink: 16 bytes leftover after parsing attributes in process `syz-executor.3'. MINIX-fs: mounting unchecked file system, running fsck is recommended MINIX-fs: mounting unchecked file system, running fsck is recommended netlink: 16 bytes leftover after parsing attributes in process `syz-executor.3'. kauditd_printk_skb: 37 callbacks suppressed audit: type=1800 audit(1640432733.524:162): pid=14010 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=14347 res=0 audit: type=1800 audit(1640432733.814:163): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 audit: type=1800 audit(1640432733.814:164): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 audit: type=1800 audit(1640432733.814:165): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 audit: type=1800 audit(1640432733.814:166): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 audit: type=1800 audit(1640432733.814:167): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 audit: type=1800 audit(1640432733.814:168): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 audit: type=1800 audit(1640432733.814:169): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 audit: type=1800 audit(1640432733.814:170): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 audit: type=1800 audit(1640432733.814:171): pid=14018 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="sched_switch" dev="sda1" ino=14350 res=0 Process accounting resumed FAT-fs (loop2): Directory bread(block 6) failed unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1 Process accounting resumed Process accounting resumed Process accounting resumed Process accounting resumed Process accounting resumed Process accounting resumed