audit: type=1326 audit(1667855372.602:13): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=10095 comm="syz-executor.0" exe="/root/syz-executor.0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f8e195cf5a9 code=0x0 ====================================================== WARNING: possible circular locking dependency detected 4.14.298-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/10132 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#10){++++}, at: [] inode_trylock include/linux/fs.h:739 [inline] (&sb->s_type->i_mutex_key#10){++++}, at: [] ext4_file_write_iter+0x1cc/0xd20 fs/ext4/file.c:236 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&sb->s_type->i_mutex_key#10){++++}: 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 ext4_sync_file+0x8ed/0x12c0 fs/ext4/fsync.c:118 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:406 -> #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:406 -> #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 sb_init_dio_done_wq+0x61/0x80 fs/direct-io.c:635 do_blockdev_direct_IO fs/direct-io.c:1287 [inline] __blockdev_direct_IO+0x3df1/0xdcb0 fs/direct-io.c:1423 ext4_direct_IO_write fs/ext4/inode.c:3763 [inline] ext4_direct_IO+0x888/0x1b80 fs/ext4/inode.c:3904 generic_file_direct_write+0x1df/0x420 mm/filemap.c:2958 __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3137 ext4_file_write_iter+0x276/0xd20 fs/ext4/file.c:270 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+0x5e/0xd3 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#10 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#10); lock((&dio->complete_work)); lock(&sb->s_type->i_mutex_key#10); lock("dio/%s"sb->s_id); *** DEADLOCK *** 2 locks held by syz-executor.5/10132: #0: (sb_writers#3){.+.+}, at: [] file_start_write include/linux/fs.h:2714 [inline] #0: (sb_writers#3){.+.+}, at: [] aio_write+0x408/0x560 fs/aio.c:1552 #1: (&sb->s_type->i_mutex_key#10){++++}, at: [] inode_trylock include/linux/fs.h:739 [inline] #1: (&sb->s_type->i_mutex_key#10){++++}, at: [] ext4_file_write_iter+0x1cc/0xd20 fs/ext4/file.c:236 stack backtrace: CPU: 1 PID: 10132 Comm: syz-executor.5 Not tainted 4.14.298-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 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 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 sb_init_dio_done_wq+0x61/0x80 fs/direct-io.c:635 do_blockdev_direct_IO fs/direct-io.c:1287 [inline] __blockdev_direct_IO+0x3df1/0xdcb0 fs/direct-io.c:1423 ext4_direct_IO_write fs/ext4/inode.c:3763 [inline] ext4_direct_IO+0x888/0x1b80 fs/ext4/inode.c:3904 generic_file_direct_write+0x1df/0x420 mm/filemap.c:2958 __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3137 ext4_file_write_iter+0x276/0xd20 fs/ext4/file.c:270 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+0x5e/0xd3 audit: type=1326 audit(1667855373.622:14): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=10221 comm="syz-executor.1" exe="/root/syz-executor.1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7ff0b00985a9 code=0x7ffc0000 audit: type=1326 audit(1667855373.622:15): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=10221 comm="syz-executor.1" exe="/root/syz-executor.1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7ff0b00985a9 code=0x7ffc0000 netlink: 16 bytes leftover after parsing attributes in process `syz-executor.3'. syz-executor.1 uses obsolete (PF_INET,SOCK_PACKET) x_tables: ip_tables: icmp match: only valid for protocol 1 UDF-fs: error (device loop1): udf_process_sequence: Block 100 of volume descriptor sequence is corrupted or we could not read it UDF-fs: error (device loop1): udf_process_sequence: Block 2016 of volume descriptor sequence is corrupted or we could not read it BTRFS: device fsid da33867d-e382-4163-b5e0-ea15c91cfb38 UDF-fs: error (device loop1): udf_read_tagged: read failed, block=512, location=512 devid 1 transid 7 /dev/loop2 BTRFS info (device loop2): enabling free space tree BTRFS info (device loop2): enabling ssd optimizations print_req_error: I/O error, dev loop1, sector 0 BTRFS info (device loop2): not using ssd optimizations BTRFS info (device loop2): using free space tree kauditd_printk_skb: 3 callbacks suppressed audit: type=1804 audit(1667855377.013:19): pid=10584 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2813489659/syzkaller.fvX5cu/63/bus" dev="sda1" ino=14078 res=1 BTRFS info (device loop2): has skinny extents BTRFS warning (device loop2): loop2 checksum verify failed on 30420992 wanted 538FDB82 found ABC4B005 level 0 BTRFS info (device loop2): read error corrected: ino 0 off 30420992 (dev /dev/loop2 sector 75800) BTRFS info (device loop2): creating free space tree BTRFS info (device loop2): setting 1 ro feature flag BTRFS info (device loop2): setting 2 ro feature flag BTRFS info (device loop2): checking UUID tree BTRFS info (device loop2): enabling free space tree BTRFS info (device loop2): enabling ssd optimizations BTRFS: device fsid 8ff932b8-f4e4-4b03-aed6-d7e5736fd60a devid 1 transid 8 /dev/loop3 BTRFS info (device loop2): not using ssd optimizations BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents BTRFS error (device loop3): unsupported checksum algorithm 1 BTRFS error (device loop3): superblock checksum mismatch BTRFS error (device loop3): open_ctree failed BTRFS warning (device loop2): loop2 checksum verify failed on 30420992 wanted 538FDB82 found ABC4B005 level 0 BTRFS info (device loop2): read error corrected: ino 0 off 30420992 (dev /dev/loop2 sector 75800) BTRFS info (device loop2): creating free space tree BTRFS info (device loop2): setting 1 ro feature flag BTRFS info (device loop2): setting 2 ro feature flag BTRFS info (device loop2): checking UUID tree audit: type=1800 audit(1667855378.163:20): pid=10729 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="bus" dev="sda1" ino=14062 res=0 BTRFS info (device loop2): enabling free space tree BTRFS info (device loop2): enabling ssd optimizations overlayfs: unrecognized mount option "obj_type=/sys/kernel/debug/damon/rm_contexts" or missing value BTRFS info (device loop2): not using ssd optimizations BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents BTRFS warning (device loop2): loop2 checksum verify failed on 30420992 wanted 538FDB82 found ABC4B005 level 0 BTRFS info (device loop2): read error corrected: ino 0 off 30420992 (dev /dev/loop2 sector 75800) BTRFS info (device loop2): creating free space tree BTRFS info (device loop2): setting 1 ro feature flag BTRFS info (device loop2): setting 2 ro feature flag BTRFS info (device loop2): checking UUID tree BTRFS error (device loop3): unsupported checksum algorithm 1 BTRFS error (device loop3): superblock checksum mismatch BTRFS info (device loop2): enabling free space tree BTRFS error (device loop3): open_ctree failed BTRFS error (device loop3): unsupported checksum algorithm 1 BTRFS info (device loop2): enabling ssd optimizations BTRFS error (device loop3): superblock checksum mismatch BTRFS info (device loop2): not using ssd optimizations BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents BTRFS warning (device loop2): loop2 checksum verify failed on 30420992 wanted 538FDB82 found ABC4B005 level 0 BTRFS info (device loop2): read error corrected: ino 0 off 30420992 (dev /dev/loop2 sector 75800) BTRFS info (device loop2): creating free space tree BTRFS info (device loop2): setting 1 ro feature flag BTRFS info (device loop2): setting 2 ro feature flag BTRFS info (device loop2): checking UUID tree BTRFS error (device loop3): open_ctree failed audit: type=1800 audit(1667855378.843:21): pid=10825 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=14062 res=0 audit: type=1800 audit(1667855378.873:22): pid=10793 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="bus" dev="sda1" ino=14063 res=0 BTRFS error (device loop1): unsupported checksum algorithm 1 BTRFS error (device loop1): superblock checksum mismatch BTRFS error (device loop1): open_ctree failed BTRFS error (device loop1): unsupported checksum algorithm 1 BTRFS error (device loop1): superblock checksum mismatch BTRFS error (device loop1): open_ctree failed audit: type=1800 audit(1667855379.603:23): pid=10883 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=13890 res=0 audit: type=1800 audit(1667855379.603:24): pid=10915 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="bus" dev="sda1" ino=14014 res=0 BTRFS error (device loop3): unsupported checksum algorithm 1 BTRFS error (device loop3): superblock checksum mismatch BTRFS error (device loop3): open_ctree failed BTRFS error (device loop3): unsupported checksum algorithm 1 BTRFS error (device loop3): superblock checksum mismatch BTRFS error (device loop3): open_ctree failed audit: type=1800 audit(1667855380.443:25): pid=10982 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=14100 res=0 unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1 audit: type=1800 audit(1667855380.443:26): pid=10947 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="bus" dev="sda1" ino=14111 res=0 audit: type=1804 audit(1667855381.144:27): pid=11018 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2813489659/syzkaller.fvX5cu/70/file0/bus" dev="loop1" ino=4 res=1 Zero length message leads to an empty skb overlayfs: unrecognized mount option "metacopy=on" or missing value