loop0: detected capacity change from 0 to 32768 ocfs2: Slot 0 on device (7,0) was already allocated to this node! ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz-executor413/5951 is trying to acquire lock: ffff888028ba6800 (sb_internal#2){.+.+}-{0:0}, at: ocfs2_setattr+0x9eb/0x1d10 fs/ocfs2/file.c:1275 but task is already holding lock: ffff88804c4e6c50 (&oi->ip_alloc_sem){++++}-{4:4}, at: ocfs2_setattr+0x9dc/0x1d10 fs/ocfs2/file.c:1274 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&oi->ip_alloc_sem){++++}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 ocfs2_xattr_ibody_find+0x135/0x8f0 fs/ocfs2/xattr.c:2927 ocfs2_xattr_set_handle+0x3f2/0x7f0 fs/ocfs2/xattr.c:3750 ocfs2_init_security_set+0xbd/0xe0 fs/ocfs2/xattr.c:7574 ocfs2_mknod+0x13c8/0x21a0 fs/ocfs2/namei.c:423 ocfs2_create+0x195/0x460 fs/ocfs2/namei.c:678 lookup_open+0xc17/0x1a60 fs/namei.c:4567 open_last_lookups fs/namei.c:4767 [inline] path_openat+0x67c/0x1d60 fs/namei.c:4997 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&journal->j_trans_barrier){.+.+}-{4:4}: down_read+0x97/0x200 kernel/locking/rwsem.c:1574 ocfs2_start_trans+0x3af/0x700 fs/ocfs2/journal.c:369 ocfs2_mknod+0xeed/0x21a0 fs/ocfs2/namei.c:365 ocfs2_create+0x195/0x460 fs/ocfs2/namei.c:678 lookup_open+0xc17/0x1a60 fs/namei.c:4567 open_last_lookups fs/namei.c:4767 [inline] path_openat+0x67c/0x1d60 fs/namei.c:4997 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (sb_internal#2){.+.+}-{0:0}: check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs/super.h:19 [inline] sb_start_intwrite include/linux/fs/super.h:177 [inline] ocfs2_start_trans+0x2ac/0x700 fs/ocfs2/journal.c:367 ocfs2_setattr+0x9eb/0x1d10 fs/ocfs2/file.c:1275 notify_change+0xbb8/0xec0 fs/attr.c:556 chmod_common+0x262/0x480 fs/open.c:686 vfs_fchmod fs/open.c:703 [inline] __do_sys_fchmod fs/open.c:713 [inline] __se_sys_fchmod fs/open.c:706 [inline] __x64_sys_fchmod+0xf5/0x160 fs/open.c:706 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: sb_internal#2 --> &journal->j_trans_barrier --> &oi->ip_alloc_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&oi->ip_alloc_sem); lock(&journal->j_trans_barrier); lock(&oi->ip_alloc_sem); rlock(sb_internal#2); *** DEADLOCK *** locks held by syz-executor413/5951: 3, last CPU#0: #0: ffff888028ba6510 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:494 #1: ffff88804c4e7000 (&sb->s_type->i_mutex_key#24){+.+.}-{4:4}, at: inode_lock_killable include/linux/fs.h:1029 [inline] #1: ffff88804c4e7000 (&sb->s_type->i_mutex_key#24){+.+.}-{4:4}, at: chmod_common+0x186/0x480 fs/open.c:678 #2: ffff88804c4e6c50 (&oi->ip_alloc_sem){++++}-{4:4}, at: ocfs2_setattr+0x9dc/0x1d10 fs/ocfs2/file.c:1274 stack backtrace: CPU: 0 UID: 0 PID: 5951 Comm: syz-executor413 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219 check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs/super.h:19 [inline] sb_start_intwrite include/linux/fs/super.h:177 [inline] ocfs2_start_trans+0x2ac/0x700 fs/ocfs2/journal.c:367 ocfs2_setattr+0x9eb/0x1d10 fs/ocfs2/file.c:1275 notify_change+0xbb8/0xec0 fs/attr.c:556 chmod_common+0x262/0x480 fs/open.c:686 vfs_fchmod fs/open.c:703 [inline] __do_sys_fchmod fs/open.c:713 [inline] __se_sys_fchmod fs/open.c:706 [inline] __x64_sys_fchmod+0xf5/0x160 fs/open.c:706 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f58660bbfe7 Code: 00 66 90 48 83 ec 10 48 63 ff 45 31 c9 45 31 c0 6a 03 31 c9 31 d2 31 f6 e8 f6 07 02 00 48 83 c4 18 c3 90 b8 5b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 d8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe44efe058 EFLAGS: 00000202 ORIG_RAX: 000000000000005b RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f58660bbfe7 RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000000000000003 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffe44efe178 R13: 0000000000000002 R14: 00007f586613dc60 R1