loop1: detected capacity change from 0 to 32768 ocfs2: Mounting device (7,1) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc4-syzkaller-g3c795c3404e8 #0 Not tainted ------------------------------------------------------ syz.1.1682/11826 is trying to acquire lock: ffff0001ffb08c00 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:869 [inline] ffff0001ffb08c00 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{4:4}, at: ocfs2_reserve_local_alloc_bits+0x104/0x26a0 fs/ocfs2/localalloc.c:636 but task is already holding lock: ffff0000dde38660 (&ocfs2_file_ip_alloc_sem_key){++++}-{4:4}, at: ocfs2_dio_wr_get_block+0x730/0x13cc fs/ocfs2/aops.c:2197 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&ocfs2_file_ip_alloc_sem_key){++++}-{4:4}: down_write+0x50/0xc0 kernel/locking/rwsem.c:1577 ocfs2_try_remove_refcount_tree+0xb4/0x2d8 fs/ocfs2/refcounttree.c:932 ocfs2_xattr_set+0x460/0xe9c fs/ocfs2/xattr.c:3669 ocfs2_set_acl+0x574/0x628 fs/ocfs2/acl.c:254 ocfs2_iop_set_acl+0x190/0x25c fs/ocfs2/acl.c:286 set_posix_acl fs/posix_acl.c:954 [inline] vfs_set_acl+0x70c/0x974 fs/posix_acl.c:1133 do_set_acl+0xc8/0x1a8 fs/posix_acl.c:1278 do_setxattr fs/xattr.c:633 [inline] file_setxattr+0x210/0x294 fs/xattr.c:646 path_setxattrat+0x2ac/0x320 fs/xattr.c:711 __do_sys_fsetxattr fs/xattr.c:761 [inline] __se_sys_fsetxattr fs/xattr.c:758 [inline] __arm64_sys_fsetxattr+0xc0/0xdc fs/xattr.c:758 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:771 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:790 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #4 (&oi->ip_xattr_sem){++++}-{4:4}: down_write+0x50/0xc0 kernel/locking/rwsem.c:1577 ocfs2_xattr_set_handle+0x2a8/0x5e4 fs/ocfs2/xattr.c:3501 ocfs2_init_security_set+0xb4/0xd8 fs/ocfs2/xattr.c:7307 ocfs2_mknod+0x106c/0x1cf0 fs/ocfs2/namei.c:419 ocfs2_create+0x190/0x474 fs/ocfs2/namei.c:673 lookup_open fs/namei.c:3717 [inline] open_last_lookups fs/namei.c:3816 [inline] path_openat+0x12d8/0x2c40 fs/namei.c:4052 do_filp_open+0x18c/0x36c fs/namei.c:4082 do_sys_openat2+0x11c/0x1b4 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1463 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:771 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:790 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #3 (jbd2_handle){++++}-{0:0}: start_this_handle+0xe74/0x10dc fs/jbd2/transaction.c:444 jbd2__journal_start+0x288/0x51c fs/jbd2/transaction.c:501 jbd2_journal_start+0x3c/0x4c fs/jbd2/transaction.c:540 ocfs2_start_trans+0x368/0x6b0 fs/ocfs2/journal.c:374 ocfs2_block_group_alloc fs/ocfs2/suballoc.c:685 [inline] ocfs2_reserve_suballoc_bits+0x630/0x3b9c fs/ocfs2/suballoc.c:834 ocfs2_reserve_new_metadata_blocks+0x368/0x810 fs/ocfs2/suballoc.c:984 ocfs2_mknod+0xbd8/0x1cf0 fs/ocfs2/namei.c:347 ocfs2_create+0x190/0x474 fs/ocfs2/namei.c:673 vfs_create+0x21c/0x368 fs/namei.c:3414 do_mknodat+0x39c/0x4a8 fs/namei.c:4294 __do_sys_mknodat fs/namei.c:4322 [inline] __se_sys_mknodat fs/namei.c:4319 [inline] __arm64_sys_mknodat+0xac/0xc8 fs/namei.c:4319 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:771 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:790 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #2 (&journal->j_trans_barrier){.+.+}-{4:4}: down_read+0x58/0x2f8 kernel/locking/rwsem.c:1524 ocfs2_start_trans+0x35c/0x6b0 fs/ocfs2/journal.c:372 ocfs2_block_group_alloc fs/ocfs2/suballoc.c:685 [inline] ocfs2_reserve_suballoc_bits+0x630/0x3b9c fs/ocfs2/suballoc.c:834 ocfs2_reserve_new_metadata_blocks+0x368/0x810 fs/ocfs2/suballoc.c:984 ocfs2_mknod+0xbd8/0x1cf0 fs/ocfs2/namei.c:347 ocfs2_create+0x190/0x474 fs/ocfs2/namei.c:673 vfs_create+0x21c/0x368 fs/namei.c:3414 do_mknodat+0x39c/0x4a8 fs/namei.c:4294 __do_sys_mknodat fs/namei.c:4322 [inline] __se_sys_mknodat fs/namei.c:4319 [inline] __arm64_sys_mknodat+0xac/0xc8 fs/namei.c:4319 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:771 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:790 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #1 (sb_internal#3){.+.+}-{0:0}: 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.h:1795 [inline] sb_start_intwrite include/linux/fs.h:1978 [inline] ocfs2_start_trans+0x1f4/0x6b0 fs/ocfs2/journal.c:370 ocfs2_mknod+0xc50/0x1cf0 fs/ocfs2/namei.c:361 ocfs2_create+0x190/0x474 fs/ocfs2/namei.c:673 lookup_open fs/namei.c:3717 [inline] open_last_lookups fs/namei.c:3816 [inline] path_openat+0x12d8/0x2c40 fs/namei.c:4052 do_filp_open+0x18c/0x36c fs/namei.c:4082 do_sys_openat2+0x11c/0x1b4 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1463 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:771 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:790 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain kernel/locking/lockdep.c:3911 [inline] __lock_acquire+0x1774/0x30a4 kernel/locking/lockdep.c:5240 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5871 down_write+0x50/0xc0 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:869 [inline] ocfs2_reserve_local_alloc_bits+0x104/0x26a0 fs/ocfs2/localalloc.c:636 ocfs2_reserve_clusters_with_limit+0x198/0x9e0 fs/ocfs2/suballoc.c:1168 ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1229 [inline] ocfs2_lock_allocators+0x27c/0x518 fs/ocfs2/suballoc.c:2772 ocfs2_write_begin_nolock+0x1ef4/0x3864 fs/ocfs2/aops.c:1718 ocfs2_dio_wr_get_block+0x944/0x13cc fs/ocfs2/aops.c:2211 get_more_blocks fs/direct-io.c:648 [inline] do_direct_IO fs/direct-io.c:936 [inline] __blockdev_direct_IO+0x10bc/0x2818 fs/direct-io.c:1243 ocfs2_direct_IO+0x210/0x280 fs/ocfs2/aops.c:2438 generic_file_direct_write+0x1a8/0x350 mm/filemap.c:4046 __generic_file_write_iter+0x10c/0x204 mm/filemap.c:4215 ocfs2_file_write_iter+0x1328/0x1b84 fs/ocfs2/file.c:2469 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x62c/0x97c fs/read_write.c:686 ksys_write+0x120/0x210 fs/read_write.c:738 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:746 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:771 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:790 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 other info that might help us debug this: Chain exists of: &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6 --> &oi->ip_xattr_sem --> &ocfs2_file_ip_alloc_sem_key Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_file_ip_alloc_sem_key); lock(&oi->ip_xattr_sem); lock(&ocfs2_file_ip_alloc_sem_key); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6); *** DEADLOCK *** 4 locks held by syz.1.1682/11826: #0: ffff0000d02009b8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x1fc/0x2a0 fs/file.c:1217 #1: ffff0000fad2a428 (sb_writers#18){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3096 [inline] #1: ffff0000fad2a428 (sb_writers#18){.+.+}-{0:0}, at: vfs_write+0x244/0x97c fs/read_write.c:682 #2: ffff0000dde389c0 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:869 [inline] #2: ffff0000dde389c0 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: ocfs2_file_write_iter+0x3a0/0x1b84 fs/ocfs2/file.c:2399 #3: ffff0000dde38660 (&ocfs2_file_ip_alloc_sem_key){++++}-{4:4}, at: ocfs2_dio_wr_get_block+0x730/0x13cc fs/ocfs2/aops.c:2197 stack backtrace: CPU: 1 UID: 0 PID: 11826 Comm: syz.1.1682 Not tainted 6.16.0-rc4-syzkaller-g3c795c3404e8 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:501 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x324/0x32c kernel/locking/lockdep.c:2046 check_noncircular+0x154/0x174 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain kernel/locking/lockdep.c:3911 [inline] __lock_acquire+0x1774/0x30a4 kernel/locking/lockdep.c:5240 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5871 down_write+0x50/0xc0 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:869 [inline] ocfs2_reserve_local_alloc_bits+0x104/0x26a0 fs/ocfs2/localalloc.c:636 ocfs2_reserve_clusters_with_limit+0x198/0x9e0 fs/ocfs2/suballoc.c:1168 ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1229 [inline] ocfs2_lock_allocators+0x27c/0x518 fs/ocfs2/suballoc.c:2772 ocfs2_write_begin_nolock+0x1ef4/0x3864 fs/ocfs2/aops.c:1718 ocfs2_dio_wr_get_block+0x944/0x13cc fs/ocfs2/aops.c:2211 get_more_blocks fs/direct-io.c:648 [inline] do_direct_IO fs/direct-io.c:936 [inline] __blockdev_direct_IO+0x10bc/0x2818 fs/direct-io.c:1243 ocfs2_direct_IO+0x210/0x280 fs/ocfs2/aops.c:2438 generic_file_direct_write+0x1a8/0x350 mm/filemap.c:4046 __generic_file_write_iter+0x10c/0x204 mm/filemap.c:4215 ocfs2_file_write_iter+0x1328/0x1b84 fs/ocfs2/file.c:2469 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x62c/0x97c fs/read_write.c:686 ksys_write+0x120/0x210 fs/read_write.c:738 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:746 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:771 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:790 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 OCFS2: ERROR (device loop1): int ocfs2_validate_gd_self(struct super_block *, struct buffer_head *, int): Group descriptor #2304 has bad signature On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: File system is now read-only. (syz.1.1682,11826,1):ocfs2_search_chain:1852 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_search_chain:1940 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_claim_suballoc_bits:2010 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_claim_suballoc_bits:2063 ERROR: status = -30 (syz.1.1682,11826,1):__ocfs2_claim_clusters:2438 ERROR: status = -30 (syz.1.1682,11826,1):__ocfs2_claim_clusters:2446 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_local_alloc_new_window:1199 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_local_alloc_new_window:1224 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_local_alloc_slide_window:1298 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_local_alloc_slide_window:1317 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_reserve_local_alloc_bits:672 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_reserve_local_alloc_bits:710 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_reserve_clusters_with_limit:1172 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_reserve_clusters_with_limit:1221 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_lock_allocators:2775 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_write_begin_nolock:1722 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_dio_wr_get_block:2215 ERROR: status = -30 (syz.1.1682,11826,1):ocfs2_dio_end_io:2398 ERROR: Direct IO failed, bytes = -30