====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.7.1088/18368 is trying to acquire lock: ffff88805d611890 (&ocfs2_file_ip_alloc_sem_key){++++}-{4:4}, at: ocfs2_try_remove_refcount_tree+0xb6/0x320 fs/ocfs2/refcounttree.c:932 but task is already holding lock: ffff88805d611918 (&oi->ip_xattr_sem){++++}-{4:4}, at: ocfs2_try_remove_refcount_tree+0xa4/0x320 fs/ocfs2/refcounttree.c:931 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&oi->ip_xattr_sem){++++}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_read+0x97/0x1f0 kernel/locking/rwsem.c:1537 ocfs2_xattr_get+0xdf/0x220 fs/ocfs2/xattr.c:1338 __vfs_getxattr+0x3f4/0x430 fs/xattr.c:423 smk_fetch+0xb4/0x140 security/smack/smack_lsm.c:289 smack_d_instantiate+0x6f5/0x940 security/smack/smack_lsm.c:3606 security_d_instantiate+0x10a/0x200 security/security.c:4148 d_instantiate+0x55/0xa0 fs/dcache.c:1961 ocfs2_mknod+0x1899/0x2050 fs/ocfs2/namei.c:453 ocfs2_mkdir+0x191/0x440 fs/ocfs2/namei.c:659 vfs_mkdir+0x306/0x510 fs/namei.c:4453 do_mkdirat+0x247/0x590 fs/namei.c:4486 __do_sys_mkdirat fs/namei.c:4503 [inline] __se_sys_mkdirat fs/namei.c:4501 [inline] __x64_sys_mkdirat+0x87/0xa0 fs/namei.c:4501 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (jbd2_handle){++++}-{0:0}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 jbd2_journal_lock_updates+0xaa/0x360 fs/jbd2/transaction.c:861 __ocfs2_flush_truncate_log+0x2ba/0x10e0 fs/ocfs2/alloc.c:6037 ocfs2_flush_truncate_log+0x4f/0x70 fs/ocfs2/alloc.c:6084 ocfs2_sync_fs+0x116/0x310 fs/ocfs2/super.c:406 sync_filesystem+0x1ce/0x250 fs/sync.c:66 ocfs2_reconfigure+0x139/0xb90 fs/ocfs2/super.c:616 reconfigure_super+0x227/0x890 fs/super.c:1076 do_remount fs/namespace.c:3279 [inline] path_mount+0xd1a/0xfe0 fs/namespace.c:4029 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x3a/0x50 kernel/locking/rwsem.c:1590 inode_lock include/linux/fs.h:980 [inline] ocfs2_remove_btree_range+0x646/0x1540 fs/ocfs2/alloc.c:5750 ocfs2_remove_inode_range+0xe60/0x2430 fs/ocfs2/file.c:1907 __ocfs2_change_file_space+0x826/0xe80 fs/ocfs2/file.c:2028 ocfs2_fallocate+0x1f8/0x240 fs/ocfs2/file.c:2138 vfs_fallocate+0x672/0x7f0 fs/open.c:342 ioctl_preallocate fs/ioctl.c:289 [inline] file_ioctl+0x61d/0x780 fs/ioctl.c:-1 do_vfs_ioctl+0xb36/0x1440 fs/ioctl.c:576 __do_sys_ioctl fs/ioctl.c:595 [inline] __se_sys_ioctl+0x82/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&ocfs2_file_ip_alloc_sem_key){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x3a/0x50 kernel/locking/rwsem.c:1590 ocfs2_try_remove_refcount_tree+0xb6/0x320 fs/ocfs2/refcounttree.c:932 ocfs2_xattr_set+0x595/0x11f0 fs/ocfs2/xattr.c:3669 ocfs2_set_acl+0x701/0x7b0 fs/ocfs2/acl.c:254 ocfs2_iop_set_acl+0x1aa/0x2a0 fs/ocfs2/acl.c:286 set_posix_acl fs/posix_acl.c:954 [inline] vfs_remove_acl+0x498/0x700 fs/posix_acl.c:1241 ovl_do_remove_acl fs/overlayfs/overlayfs.h:355 [inline] ovl_workdir_create+0x594/0x8b0 fs/overlayfs/super.c:364 ovl_make_workdir fs/overlayfs/super.c:679 [inline] ovl_get_workdir+0x32b/0x17b0 fs/overlayfs/super.c:837 ovl_fill_super+0x154a/0x3da0 fs/overlayfs/super.c:1468 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1343 vfs_get_tree+0x92/0x2b0 fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount+0x302/0xa10 fs/namespace.c:3727 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &ocfs2_file_ip_alloc_sem_key --> 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_file_ip_alloc_sem_key); *** DEADLOCK *** 4 locks held by syz.7.1088/18368: #0: ffff88802f5c60d0 (&type->s_umount_key#52/1){+.+.}-{4:4}, at: alloc_super+0x1ba/0x9a0 fs/super.c:344 #1: ffff88803b326480 (sb_writers#21){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:508 #2: ffff88805d611c40 (&sb->s_type->i_mutex_key#26){++++}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline] #2: ffff88805d611c40 (&sb->s_type->i_mutex_key#26){++++}-{4:4}, at: vfs_remove_acl+0xf9/0x700 fs/posix_acl.c:1222 #3: ffff88805d611918 (&oi->ip_xattr_sem){++++}-{4:4}, at: ocfs2_try_remove_refcount_tree+0xa4/0x320 fs/ocfs2/refcounttree.c:931 stack backtrace: CPU: 0 UID: 0 PID: 18368 Comm: syz.7.1088 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2043 check_noncircular+0x134/0x160 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+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x3a/0x50 kernel/locking/rwsem.c:1590 ocfs2_try_remove_refcount_tree+0xb6/0x320 fs/ocfs2/refcounttree.c:932 ocfs2_xattr_set+0x595/0x11f0 fs/ocfs2/xattr.c:3669 ocfs2_set_acl+0x701/0x7b0 fs/ocfs2/acl.c:254 ocfs2_iop_set_acl+0x1aa/0x2a0 fs/ocfs2/acl.c:286 set_posix_acl fs/posix_acl.c:954 [inline] vfs_remove_acl+0x498/0x700 fs/posix_acl.c:1241 ovl_do_remove_acl fs/overlayfs/overlayfs.h:355 [inline] ovl_workdir_create+0x594/0x8b0 fs/overlayfs/super.c:364 ovl_make_workdir fs/overlayfs/super.c:679 [inline] ovl_get_workdir+0x32b/0x17b0 fs/overlayfs/super.c:837 ovl_fill_super+0x154a/0x3da0 fs/overlayfs/super.c:1468 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1343 vfs_get_tree+0x92/0x2b0 fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount+0x302/0xa10 fs/namespace.c:3727 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount+0x313/0x410 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcc074af6c9 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcc0570e038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fcc07705fa0 RCX: 00007fcc074af6c9 RDX: 0000200000000b80 RSI: 0000200000000100 RDI: 0000000000000000 RBP: 00007fcc07531f91 R08: 0000200000000180 R09: 0000000000000000 R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fcc07706038 R14: 00007fcc07705fa0 R15: 00007ffe1faa6978 overlayfs: upper fs does not support tmpfile. (syz.7.1088,18368,1):ocfs2_find_entry:1094 ERROR: status = -117 (syz.7.1088,18368,1):ocfs2_orphan_del:2396 ERROR: status = -117 (syz.7.1088,18368,1):ocfs2_orphan_del:2418 ERROR: status = -117 (syz.7.1088,18368,1):ocfs2_remove_inode:752 ERROR: status = -117 (syz.7.1088,18368,1):ocfs2_wipe_inode:897 ERROR: status = -117 (syz.7.1088,18368,1):ocfs2_delete_inode:1158 ERROR: status = -117 overlayfs: upper fs does not support RENAME_WHITEOUT. overlayfs: upper fs missing required features.