====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.12/5906 is trying to acquire lock: ffff888077028660 (&oi->ip_alloc_sem){+.+.}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xb7/0x360 fs/ocfs2/refcounttree.c:932 but task is already holding lock: ffff8880770286f8 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xa5/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+0x46/0x2e0 kernel/locking/rwsem.c:1520 ocfs2_init_acl+0x30a/0x770 fs/ocfs2/acl.c:366 ocfs2_mknod+0x1427/0x2310 fs/ocfs2/namei.c:410 ocfs2_create+0x196/0x430 fs/ocfs2/namei.c:674 vfs_create+0x1ef/0x360 fs/namei.c:3241 do_mknodat+0x3d0/0x500 fs/namei.c:4096 __do_sys_mknod fs/namei.c:4129 [inline] __se_sys_mknod fs/namei.c:4127 [inline] __x64_sys_mknod+0x8e/0xa0 fs/namei.c:4127 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #2 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x46/0x2e0 kernel/locking/rwsem.c:1520 ocfs2_start_trans+0x3a8/0x6f0 fs/ocfs2/journal.c:372 ocfs2_modify_bh+0xe4/0x4c0 fs/ocfs2/quota_local.c:101 ocfs2_local_read_info+0x1433/0x17d0 fs/ocfs2/quota_local.c:764 dquot_load_quota_sb+0x734/0xb30 fs/quota/dquot.c:2492 dquot_load_quota_inode+0x2d7/0x5c0 fs/quota/dquot.c:2529 ocfs2_enable_quotas+0x1c4/0x4a0 fs/ocfs2/super.c:926 ocfs2_fill_super+0x416d/0x5010 fs/ocfs2/super.c:1141 mount_bdev+0x21c/0x2c0 fs/super.c:1651 legacy_get_tree+0xea/0x180 fs/fs_context.c:662 vfs_get_tree+0x8c/0x280 fs/super.c:1772 do_new_mount+0x24a/0xa40 fs/namespace.c:3386 do_mount fs/namespace.c:3726 [inline] __do_sys_mount fs/namespace.c:3935 [inline] __se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3912 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (sb_internal#3){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1633 [inline] sb_start_intwrite include/linux/fs.h:1755 [inline] ocfs2_start_trans+0x2a9/0x6f0 fs/ocfs2/journal.c:370 ocfs2_orphan_for_truncate fs/ocfs2/file.c:396 [inline] ocfs2_truncate_file+0x645/0x1530 fs/ocfs2/file.c:500 ocfs2_setattr+0x15b8/0x1bf0 fs/ocfs2/file.c:1211 notify_change+0xb05/0xde0 fs/attr.c:499 do_truncate+0x1b0/0x240 fs/open.c:66 do_coredump+0x21a9/0x24a0 fs/coredump.c:811 get_signal+0x10da/0x1390 kernel/signal.c:2897 arch_do_signal_or_restart+0xc2/0x7b0 arch/x86/kernel/signal.c:310 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+0x9/0x30 kernel/entry/common.c:315 exc_general_protection+0x168/0x1f0 arch/x86/kernel/traps.c:745 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:602 -> #0 (&oi->ip_alloc_sem){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x37ef/0x7d80 kernel/locking/lockdep.c:5137 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754 down_write+0x97/0x200 kernel/locking/rwsem.c:1573 ocfs2_try_remove_refcount_tree+0xb7/0x360 fs/ocfs2/refcounttree.c:932 ocfs2_truncate_file+0xe87/0x1530 fs/ocfs2/file.c:521 ocfs2_setattr+0x15b8/0x1bf0 fs/ocfs2/file.c:1211 notify_change+0xb05/0xde0 fs/attr.c:499 do_truncate+0x1b0/0x240 fs/open.c:66 do_coredump+0x21a9/0x24a0 fs/coredump.c:811 get_signal+0x10da/0x1390 kernel/signal.c:2897 arch_do_signal_or_restart+0xc2/0x7b0 arch/x86/kernel/signal.c:310 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+0x9/0x30 kernel/entry/common.c:315 exc_general_protection+0x168/0x1f0 arch/x86/kernel/traps.c:745 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:602 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.12/5906: #0: ffff8880770289d8 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline] #0: ffff8880770289d8 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: do_truncate+0x19c/0x240 fs/open.c:64 #1: ffff8880770286f8 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_try_remove_refcount_tree+0xa5/0x360 fs/ocfs2/refcounttree.c:931 stack backtrace: CPU: 0 PID: 5906 Comm: syz.0.12 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x37ef/0x7d80 kernel/locking/lockdep.c:5137 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754 down_write+0x97/0x200 kernel/locking/rwsem.c:1573 ocfs2_try_remove_refcount_tree+0xb7/0x360 fs/ocfs2/refcounttree.c:932 ocfs2_truncate_file+0xe87/0x1530 fs/ocfs2/file.c:521 ocfs2_setattr+0x15b8/0x1bf0 fs/ocfs2/file.c:1211 notify_change+0xb05/0xde0 fs/attr.c:499 do_truncate+0x1b0/0x240 fs/open.c:66 do_coredump+0x21a9/0x24a0 fs/coredump.c:811 get_signal+0x10da/0x1390 kernel/signal.c:2897 arch_do_signal_or_restart+0xc2/0x7b0 arch/x86/kernel/signal.c:310 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+0x9/0x30 kernel/entry/common.c:315 exc_general_protection+0x168/0x1f0 arch/x86/kernel/traps.c:745 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:602 RIP: 0033:0x7fc90039e161 Code: 00 00 00 00 0f 1f 44 00 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 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f RSP: 002b:0000200000000440 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007fc900626090 RCX: 00007fc90039e159 RDX: 0000000000000000 RSI: 0000200000000440 RDI: 0000000002000000 RBP: 00007fc900435024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fc900626128 R14: 00007fc900626090 R15: 00007ffd6664cd98 syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21200, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21200, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21201, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21201, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21202, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21202, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21203, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21203, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21204, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21204, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21205, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21205, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21206, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21206, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21207, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21207, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21208, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21208, lost async page write syz.0.12: attempt to access beyond end of device loop0: rw=2049, sector=21209, nr_sectors = 1 limit=64 Buffer I/O error on dev loop0, logical block 21209, lost async page write (syz.0.12,5906,0):__ocfs2_flush_truncate_log:6033 ERROR: status = -5 (syz.0.12,5906,0):ocfs2_sync_fs:404 ERROR: status = -5 (syz.0.12,5906,0):ocfs2_local_free_info:832 ERROR: releasing quota file with used entries (type=0) (syz.0.12,5906,0):ocfs2_local_free_info:832 ERROR: releasing quota file with used entries (type=1) (syz.0.12,5906,0):ocfs2_start_trans:379 ERROR: status = -30 OCFS2: abort (device loop0): handle_t *ocfs2_start_trans(struct ocfs2_super *, int): Detected aborted journal On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: Returning error to the calling process. (syz.0.12,5906,0):ocfs2_shutdown_local_alloc:418 ERROR: status = -30 (syz.0.12,5906,0):__ocfs2_flush_truncate_log:6033 ERROR: status = -5 (syz.0.12,5906,0):ocfs2_truncate_log_shutdown:6322 ERROR: status = -5 (syz.0.12,5906,0):ocfs2_write_block:78 ERROR: status = -5 (syz.0.12,5906,0):ocfs2_update_disk_slot:199 ERROR: status = -5 (syz.0.12,5906,0):ocfs2_put_slot:517 ERROR: status = -5 (syz.0.12,5906,1):ocfs2_journal_shutdown:1108 ERROR: status = -5 ocfs2: Unmounting device (7,0) on (node local)