(syz.4.70,4408,1):ocfs2_dio_end_io:2428 ERROR: Direct IO failed, bytes = -5 overlayfs: upper fs does not support tmpfile. overlayfs: upper fs does not support RENAME_WHITEOUT. ====================================================== WARNING: possible circular locking dependency detected 5.15.169-syzkaller #0 Not tainted ------------------------------------------------------ syz.4.70/4408 is trying to acquire lock: ffff0000e6a842c8 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:789 [inline] ffff0000e6a842c8 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_xattr_set+0xb80/0x1478 fs/ocfs2/xattr.c:3627 but task is already holding lock: ffff0000e0181538 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_xattr_set+0x4e4/0x1478 fs/ocfs2/xattr.c:3588 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&oi->ip_xattr_sem){++++}-{3:3}: down_read+0xc0/0x398 kernel/locking/rwsem.c:1498 ocfs2_init_acl+0x2d0/0x778 fs/ocfs2/acl.c:365 ocfs2_mknod+0x1558/0x24f8 fs/ocfs2/namei.c:408 ocfs2_create+0x184/0x4c8 fs/ocfs2/namei.c:672 lookup_open fs/namei.c:3462 [inline] open_last_lookups fs/namei.c:3532 [inline] path_openat+0xf18/0x26cc fs/namei.c:3739 do_filp_open+0x1a8/0x3b4 fs/namei.c:3769 do_sys_openat2+0x128/0x3e0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1280 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> #1 (jbd2_handle){++++}-{0:0}: jbd2_journal_lock_updates+0xbc/0x328 fs/jbd2/transaction.c:881 __ocfs2_flush_truncate_log+0x284/0x10f0 fs/ocfs2/alloc.c:6020 ocfs2_flush_truncate_log+0x4c/0x6c fs/ocfs2/alloc.c:6067 ocfs2_sync_fs+0x110/0x31c fs/ocfs2/super.c:403 sync_filesystem+0x1a0/0x218 fs/sync.c:66 ocfs2_remount+0xf0/0x9cc fs/ocfs2/super.c:612 legacy_reconfigure+0xfc/0x114 fs/fs_context.c:634 reconfigure_super+0x1d0/0x6ec fs/super.c:938 do_remount fs/namespace.c:2668 [inline] path_mount+0xbec/0x101c fs/namespace.c:3334 do_mount fs/namespace.c:3355 [inline] __do_sys_mount fs/namespace.c:3563 [inline] __se_sys_mount fs/namespace.c:3540 [inline] __arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3540 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 down_write+0xbc/0x12c kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:789 [inline] ocfs2_xattr_set+0xb80/0x1478 fs/ocfs2/xattr.c:3627 ocfs2_xattr_trusted_set+0x4c/0x64 fs/ocfs2/xattr.c:7350 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182 __vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:216 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277 vfs_setxattr+0x1a8/0x344 fs/xattr.c:303 ovl_do_setxattr fs/overlayfs/overlayfs.h:203 [inline] ovl_make_workdir fs/overlayfs/super.c:1420 [inline] ovl_get_workdir+0x980/0x1110 fs/overlayfs/super.c:1524 ovl_fill_super+0x15b4/0x2254 fs/overlayfs/super.c:2080 mount_nodev+0x68/0x104 fs/super.c:1446 ovl_mount+0x3c/0x50 fs/overlayfs/super.c:2171 legacy_get_tree+0xd4/0x16c fs/fs_context.c:611 vfs_get_tree+0x90/0x274 fs/super.c:1530 do_new_mount+0x278/0x8fc fs/namespace.c:3012 path_mount+0x594/0x101c fs/namespace.c:3342 do_mount fs/namespace.c:3355 [inline] __do_sys_mount fs/namespace.c:3563 [inline] __se_sys_mount fs/namespace.c:3540 [inline] __arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3540 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 other info that might help us debug this: Chain exists of: &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6 --> jbd2_handle --> &oi->ip_xattr_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&oi->ip_xattr_sem); lock(jbd2_handle); lock(&oi->ip_xattr_sem); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6); *** DEADLOCK *** 4 locks held by syz.4.70/4408: #0: ffff0000ca7be0e0 (&type->s_umount_key#58/1){+.+.}-{3:3}, at: alloc_super+0x1b8/0x844 fs/super.c:229 #1: ffff0000eb644460 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:377 #2: ffff0000e0181808 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:789 [inline] #2: ffff0000e0181808 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: vfs_setxattr+0x17c/0x344 fs/xattr.c:302 #3: ffff0000e0181538 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_xattr_set+0x4e4/0x1478 fs/ocfs2/xattr.c:3588 stack backtrace: CPU: 1 PID: 4408 Comm: syz.4.70 Not tainted 5.15.169-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2011 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x32d4/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 down_write+0xbc/0x12c kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:789 [inline] ocfs2_xattr_set+0xb80/0x1478 fs/ocfs2/xattr.c:3627 ocfs2_xattr_trusted_set+0x4c/0x64 fs/ocfs2/xattr.c:7350 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182 __vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:216 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277 vfs_setxattr+0x1a8/0x344 fs/xattr.c:303 ovl_do_setxattr fs/overlayfs/overlayfs.h:203 [inline] ovl_make_workdir fs/overlayfs/super.c:1420 [inline] ovl_get_workdir+0x980/0x1110 fs/overlayfs/super.c:1524 ovl_fill_super+0x15b4/0x2254 fs/overlayfs/super.c:2080 mount_nodev+0x68/0x104 fs/super.c:1446 ovl_mount+0x3c/0x50 fs/overlayfs/super.c:2171 legacy_get_tree+0xd4/0x16c fs/fs_context.c:611 vfs_get_tree+0x90/0x274 fs/super.c:1530 do_new_mount+0x278/0x8fc fs/namespace.c:3012 path_mount+0x594/0x101c fs/namespace.c:3342 do_mount fs/namespace.c:3355 [inline] __do_sys_mount fs/namespace.c:3563 [inline] __se_sys_mount fs/namespace.c:3540 [inline] __arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3540 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 OCFS2: ERROR (device loop4): int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *, handle_t *, u32, u32, struct ocfs2_suballoc_result *): Chain allocator dinode 23 has 4294967295 used bits but only 16777215 total On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: Returning error to the calling process. (syz.4.70,4408,1):ocfs2_claim_suballoc_bits:1983 ERROR: status = -5 (syz.4.70,4408,1):__ocfs2_claim_clusters:2355 ERROR: status = -5 (syz.4.70,4408,1):__ocfs2_claim_clusters:2363 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_block_group_alloc_contig:433 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_block_group_alloc:705 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_block_group_alloc:758 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_reserve_suballoc_bits:833 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_reserve_suballoc_bits:850 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_reserve_new_metadata_blocks:990 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_reserve_new_metadata_blocks:1013 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_init_xattr_set_ctxt:3285 ERROR: status = -5 (syz.4.70,4408,1):ocfs2_xattr_set:3642 ERROR: status = -5 overlayfs: failed to set xattr on upper overlayfs: ...falling back to index=off,metacopy=off. overlayfs: upper fs missing required features.