====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.1/4410 is trying to acquire lock: ffff8880552a3f60 (&oi->ip_alloc_sem){++++}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xb3/0x360 fs/ocfs2/refcounttree.c:932 but task is already holding lock: ffff8880552a3ff8 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xa1/0x360 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){++++}-{3:3}: down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 ocfs2_init_acl+0x307/0x770 fs/ocfs2/acl.c:365 ocfs2_mknod+0x18e0/0x2580 fs/ocfs2/namei.c:410 ocfs2_create+0x1b6/0x4b0 fs/ocfs2/namei.c:674 lookup_open fs/namei.c:3490 [inline] open_last_lookups fs/namei.c:3558 [inline] path_openat+0x11b9/0x2f10 fs/namei.c:3788 do_filp_open+0x1ee/0x420 fs/namei.c:3818 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1347 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #2 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 ocfs2_start_trans+0x3a4/0x6f0 fs/ocfs2/journal.c:374 ocfs2_modify_bh+0xe0/0x4c0 fs/ocfs2/quota_local.c:101 ocfs2_local_read_info+0x1499/0x1820 fs/ocfs2/quota_local.c:764 dquot_load_quota_sb+0x72f/0xa80 fs/quota/dquot.c:2495 dquot_load_quota_inode+0x2d3/0x5c0 fs/quota/dquot.c:2532 ocfs2_enable_quotas+0x1c0/0x4a0 fs/ocfs2/super.c:926 ocfs2_fill_super+0x40fe/0x5010 fs/ocfs2/super.c:1139 mount_bdev+0x28a/0x3c0 fs/super.c:1443 legacy_get_tree+0xe6/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x247/0xa40 fs/namespace.c:3078 do_mount fs/namespace.c:3421 [inline] __do_sys_mount fs/namespace.c:3629 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (sb_internal#2){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1891 [inline] sb_start_intwrite include/linux/fs.h:2013 [inline] ocfs2_start_trans+0x2a5/0x6f0 fs/ocfs2/journal.c:372 ocfs2_orphan_for_truncate fs/ocfs2/file.c:392 [inline] ocfs2_truncate_file+0x67b/0x1660 fs/ocfs2/file.c:496 ocfs2_setattr+0x16f8/0x1d90 fs/ocfs2/file.c:1212 notify_change+0xca0/0xf90 fs/attr.c:499 do_truncate+0x1ac/0x240 fs/open.c:65 do_coredump+0x21af/0x2480 fs/coredump.c:801 get_signal+0x1093/0x1340 kernel/signal.c:2866 arch_do_signal_or_restart+0xc4/0x1310 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:316 exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1485 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:608 -> #0 (&oi->ip_alloc_sem){++++}-{3:3}: check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5676 down_write+0x36/0x60 kernel/locking/rwsem.c:1573 ocfs2_try_remove_refcount_tree+0xb3/0x360 fs/ocfs2/refcounttree.c:932 ocfs2_truncate_file+0xef5/0x1660 fs/ocfs2/file.c:517 ocfs2_setattr+0x16f8/0x1d90 fs/ocfs2/file.c:1212 notify_change+0xca0/0xf90 fs/attr.c:499 do_truncate+0x1ac/0x240 fs/open.c:65 do_coredump+0x21af/0x2480 fs/coredump.c:801 get_signal+0x1093/0x1340 kernel/signal.c:2866 arch_do_signal_or_restart+0xc4/0x1310 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:316 exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1485 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:608 other info that might help us debug this: Chain exists of: &oi->ip_alloc_sem --> &journal->j_trans_barrier --> &oi->ip_xattr_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&oi->ip_xattr_sem); lock(&journal->j_trans_barrier); lock(&oi->ip_xattr_sem); lock(&oi->ip_alloc_sem); *** DEADLOCK *** 2 locks held by syz.0.1/4410: #0: ffff8880552a42c8 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #0: ffff8880552a42c8 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at: do_truncate+0x198/0x240 fs/open.c:63 #1: ffff8880552a3ff8 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xa1/0x360 fs/ocfs2/refcounttree.c:931 stack backtrace: CPU: 1 PID: 4410 Comm: syz.0.1 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5676 down_write+0x36/0x60 kernel/locking/rwsem.c:1573 ocfs2_try_remove_refcount_tree+0xb3/0x360 fs/ocfs2/refcounttree.c:932 ocfs2_truncate_file+0xef5/0x1660 fs/ocfs2/file.c:517 ocfs2_setattr+0x16f8/0x1d90 fs/ocfs2/file.c:1212 notify_change+0xca0/0xf90 fs/attr.c:499 do_truncate+0x1ac/0x240 fs/open.c:65 do_coredump+0x21af/0x2480 fs/coredump.c:801 get_signal+0x1093/0x1340 kernel/signal.c:2866 arch_do_signal_or_restart+0xc4/0x1310 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:316 exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1485 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:608 RIP: 0033:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 002b:0000200000000108 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fdf5ea25fa0 RCX: 00007fdf5e79e019 RDX: 0000000000000000 RSI: 0000200000000100 RDI: 0000000004200000 RBP: 00007fdf5e83500c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fdf5ea26038 R14: 00007fdf5ea25fa0 R15: 00007fff42f27988