OCFS2: ERROR (device loop0): int ocfs2_validate_gd_self(struct super_block *, struct buffer_head *, int): Group descriptor #20 has bad signature On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: File system is now read-only. (syz.0.0,5347,0):ocfs2_search_chain:1913 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_search_chain:2036 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_claim_suballoc_bits:2123 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_claim_suballoc_bits:2176 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_claim_metadata:2201 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_claim_metadata:2214 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_create_new_meta_bhs:1038 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_shift_tree_depth:1400 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_grow_tree:1583 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_insert_extent:4768 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_add_clusters_in_btree:4869 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_write_cluster:1134 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_write_cluster_by_desc:1228 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_write_begin_nolock:1800 ERROR: status = -30 (syz.0.0,5347,0):ocfs2_write_begin:1888 ERROR: status = -30 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.0/5347 is trying to acquire lock: ffff8880560341a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1029 [inline] ffff8880560341a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x16d/0x4840 fs/ocfs2/suballoc.c:882 but task is already holding lock: ffff888056034fa0 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1029 [inline] ffff888056034fa0 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_wipe_inode fs/ocfs2/inode.c:854 [inline] ffff888056034fa0 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_delete_inode fs/ocfs2/inode.c:1157 [inline] ffff888056034fa0 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_evict_inode+0xe97/0x43b0 fs/ocfs2/inode.c:1299 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}: down_write+0x96/0x200 kernel/locking/rwsem.c:1625 inode_lock include/linux/fs.h:1029 [inline] ocfs2_del_inode_from_orphan+0x12e/0x7a0 fs/ocfs2/namei.c:2728 ocfs2_dio_end_io_write fs/ocfs2/aops.c:2379 [inline] ocfs2_dio_end_io+0xf9c/0x1370 fs/ocfs2/aops.c:2418 dio_complete+0x25b/0x790 fs/direct-io.c:281 __blockdev_direct_IO+0x2e5d/0x34e0 fs/direct-io.c:1303 ocfs2_direct_IO+0x251/0x2c0 fs/ocfs2/aops.c:2455 generic_file_direct_write+0x1db/0x3e0 mm/filemap.c:4259 __generic_file_write_iter+0x11d/0x230 mm/filemap.c:4428 ocfs2_file_write_iter+0x1663/0x1e70 fs/ocfs2/file.c:2476 iter_file_splice_write+0x9a1/0x10f0 fs/splice.c:736 do_splice_from fs/splice.c:936 [inline] direct_splice_actor+0x101/0x160 fs/splice.c:1159 splice_direct_to_actor+0x53a/0xc70 fs/splice.c:1103 do_splice_direct_actor fs/splice.c:1202 [inline] do_splice_direct+0x195/0x290 fs/splice.c:1228 do_sendfile+0x535/0x7d0 fs/read_write.c:1372 __do_sys_sendfile64 fs/read_write.c:1433 [inline] __se_sys_sendfile64+0x144/0x1a0 fs/read_write.c:1419 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 down_write+0x96/0x200 kernel/locking/rwsem.c:1625 inode_lock include/linux/fs.h:1029 [inline] ocfs2_reserve_suballoc_bits+0x16d/0x4840 fs/ocfs2/suballoc.c:882 ocfs2_reserve_new_metadata_blocks+0x415/0x9a0 fs/ocfs2/suballoc.c:1078 ocfs2_reserve_blocks_for_rec_trunc fs/ocfs2/alloc.c:5696 [inline] ocfs2_remove_btree_range+0x568/0x1610 fs/ocfs2/alloc.c:5752 ocfs2_commit_truncate+0xbb8/0x2310 fs/ocfs2/alloc.c:7383 ocfs2_truncate_for_delete fs/ocfs2/inode.c:701 [inline] ocfs2_wipe_inode fs/ocfs2/inode.c:868 [inline] ocfs2_delete_inode fs/ocfs2/inode.c:1157 [inline] ocfs2_evict_inode+0x1023/0x43b0 fs/ocfs2/inode.c:1299 evict+0x61e/0xb10 fs/inode.c:841 ocfs2_dentry_iput+0x24d/0x390 fs/ocfs2/dcache.c:407 __dentry_kill+0x1a2/0x690 fs/dcache.c:718 finish_dput+0xc9/0x480 fs/dcache.c:927 __fput+0x691/0xa60 fs/file_table.c:518 task_work_run+0x1d9/0x270 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x70f/0x22c0 kernel/exit.c:975 do_group_exit+0x21b/0x2d0 kernel/exit.c:1117 get_signal+0x1284/0x1330 kernel/signal.c:3037 arch_do_signal_or_restart+0xbc/0x830 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop kernel/entry/common.c:98 [inline] __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:252 [inline] irqentry_exit_to_user_mode include/linux/irq-entry-common.h:323 [inline] irqentry_exit+0x284/0x730 kernel/entry/common.c:162 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]); lock(&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]); lock(&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]); lock(&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]); *** DEADLOCK *** 2 locks held by syz.0.0/5347: #0: ffff888012a3cbc0 (&osb->nfs_sync_rwlock){.+.+}-{4:4}, at: ocfs2_nfs_sync_lock+0x106/0x270 fs/ocfs2/dlmglue.c:2875 #1: ffff888056034fa0 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1029 [inline] #1: ffff888056034fa0 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_wipe_inode fs/ocfs2/inode.c:854 [inline] #1: ffff888056034fa0 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_delete_inode fs/ocfs2/inode.c:1157 [inline] #1: ffff888056034fa0 (&ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_evict_inode+0xe97/0x43b0 fs/ocfs2/inode.c:1299 stack backtrace: CPU: 0 UID: 0 PID: 5347 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 down_write+0x96/0x200 kernel/locking/rwsem.c:1625 inode_lock include/linux/fs.h:1029 [inline] ocfs2_reserve_suballoc_bits+0x16d/0x4840 fs/ocfs2/suballoc.c:882 ocfs2_reserve_new_metadata_blocks+0x415/0x9a0 fs/ocfs2/suballoc.c:1078 ocfs2_reserve_blocks_for_rec_trunc fs/ocfs2/alloc.c:5696 [inline] ocfs2_remove_btree_range+0x568/0x1610 fs/ocfs2/alloc.c:5752 ocfs2_commit_truncate+0xbb8/0x2310 fs/ocfs2/alloc.c:7383 ocfs2_truncate_for_delete fs/ocfs2/inode.c:701 [inline] ocfs2_wipe_inode fs/ocfs2/inode.c:868 [inline] ocfs2_delete_inode fs/ocfs2/inode.c:1157 [inline] ocfs2_evict_inode+0x1023/0x43b0 fs/ocfs2/inode.c:1299 evict+0x61e/0xb10 fs/inode.c:841 ocfs2_dentry_iput+0x24d/0x390 fs/ocfs2/dcache.c:407 __dentry_kill+0x1a2/0x690 fs/dcache.c:718 finish_dput+0xc9/0x480 fs/dcache.c:927 __fput+0x691/0xa60 fs/file_table.c:518 task_work_run+0x1d9/0x270 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x70f/0x22c0 kernel/exit.c:975 do_group_exit+0x21b/0x2d0 kernel/exit.c:1117 get_signal+0x1284/0x1330 kernel/signal.c:3037 arch_do_signal_or_restart+0xbc/0x830 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop kernel/entry/common.c:98 [inline] __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:252 [inline] irqentry_exit_to_user_mode include/linux/irq-entry-common.h:323 [inline] irqentry_exit+0x284/0x730 kernel/entry/common.c:162 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 RIP: 0033:0x7f5efc39cde1 Code: Unable to access opcode bytes at 0x7f5efc39cdb7. RSP: 002b:fffffffffffffef0 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007f5efc615fa0 RCX: 00007f5efc39cdd9 RDX: 0000000000000000 RSI: fffffffffffffef0 RDI: 0000000000a00200 RBP: 00007f5efc432d69 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007f5efc616038 R14: 00007f5efc615fa0 R15: 00007ffed62b9918