====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.5.3116/17352 is trying to acquire lock: ffff88803808ea20 (&oi->ip_alloc_sem){+.+.}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xb3/0x340 fs/ocfs2/refcounttree.c:932 but task is already holding lock: ffff88803808eab8 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xa1/0x340 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+0x44/0x2e0 kernel/locking/rwsem.c:1498 ocfs2_init_acl+0x307/0x770 fs/ocfs2/acl.c:365 ocfs2_mknod+0x15cb/0x2510 fs/ocfs2/namei.c:410 ocfs2_create+0x192/0x420 fs/ocfs2/namei.c:674 lookup_open fs/namei.c:3470 [inline] open_last_lookups fs/namei.c:3540 [inline] path_openat+0x11db/0x2fa0 fs/namei.c:3747 do_filp_open+0x1e2/0x410 fs/namei.c:3777 do_sys_openat2+0x150/0x4b0 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #2 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 ocfs2_start_trans+0x3a6/0x6f0 fs/ocfs2/journal.c:374 ocfs2_mknod+0xf5a/0x2510 fs/ocfs2/namei.c:361 ocfs2_create+0x192/0x420 fs/ocfs2/namei.c:674 lookup_open fs/namei.c:3470 [inline] open_last_lookups fs/namei.c:3540 [inline] path_openat+0x11db/0x2fa0 fs/namei.c:3747 do_filp_open+0x1e2/0x410 fs/namei.c:3777 do_sys_openat2+0x150/0x4b0 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #1 (sb_internal#2){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1811 [inline] sb_start_intwrite include/linux/fs.h:1928 [inline] ocfs2_start_trans+0x2a7/0x6f0 fs/ocfs2/journal.c:372 ocfs2_orphan_for_truncate fs/ocfs2/file.c:392 [inline] ocfs2_truncate_file+0x62d/0x1460 fs/ocfs2/file.c:496 ocfs2_setattr+0x14dd/0x1ad0 fs/ocfs2/file.c:1215 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 do_coredump+0x272d/0x2ac0 fs/coredump.c:871 get_signal+0x40a/0x12c0 kernel/signal.c:2886 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:320 exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1499 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 -> #0 (&oi->ip_alloc_sem){+.+.}-{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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 ocfs2_try_remove_refcount_tree+0xb3/0x340 fs/ocfs2/refcounttree.c:932 ocfs2_truncate_file+0xe03/0x1460 fs/ocfs2/file.c:517 ocfs2_setattr+0x14dd/0x1ad0 fs/ocfs2/file.c:1215 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 do_coredump+0x272d/0x2ac0 fs/coredump.c:871 get_signal+0x40a/0x12c0 kernel/signal.c:2886 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:320 exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1499 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 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.5.3116/17352: #0: ffff88803808ed88 (&sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #0: ffff88803808ed88 (&sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: do_truncate+0x198/0x240 fs/open.c:63 #1: ffff88803808eab8 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xa1/0x340 fs/ocfs2/refcounttree.c:931 stack backtrace: CPU: 1 PID: 17352 Comm: syz.5.3116 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x296/0x330 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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 ocfs2_try_remove_refcount_tree+0xb3/0x340 fs/ocfs2/refcounttree.c:932 ocfs2_truncate_file+0xe03/0x1460 fs/ocfs2/file.c:517 ocfs2_setattr+0x14dd/0x1ad0 fs/ocfs2/file.c:1215 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 do_coredump+0x272d/0x2ac0 fs/coredump.c:871 get_signal+0x40a/0x12c0 kernel/signal.c:2886 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:320 exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1499 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 RIP: 0033:0x81415b Code: Unable to access opcode bytes at RIP 0x814131. RSP: 002b:00002000000003f8 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fb743c39fa0 RCX: 00007fb7439bff79 RDX: 0000200000000080 RSI: 00002000000003f0 RDI: 0000000020000000 RBP: 00007fb743a567e0 R08: 0000200000000400 R09: 0000200000000400 R10: 00002000000000c0 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fb743c3a038 R14: 00007fb743c39fa0 R15: 00007ffd4a4bc838 (syz.5.3116,17352,0):ocfs2_find_entry:1086 ERROR: status = -117 (syz.5.3116,17352,0):ocfs2_orphan_del:2379 ERROR: status = -117 (syz.5.3116,17352,0):ocfs2_orphan_del:2401 ERROR: status = -117 (syz.5.3116,17352,0):ocfs2_remove_inode:676 ERROR: status = -117 (syz.5.3116,17352,0):ocfs2_wipe_inode:821 ERROR: status = -117 (syz.5.3116,17352,0):ocfs2_delete_inode:1082 ERROR: status = -117 ocfs2: Unmounting device (7,5) on (node local) syz.5.3116 (17352) used greatest stack depth: 18224 bytes left