loop0: detected capacity change from 0 to 32768 ocfs2: Mounting device (7,0) on (node local, slot 0) with writeback data mode. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.325/5358 is trying to acquire lock: ffff0000f2980650 (sb_internal#5){.+.+}-{0:0}, at: ocfs2_write_begin_inline fs/ocfs2/aops.c:1481 [inline] ffff0000f2980650 (sb_internal#5){.+.+}-{0:0}, at: ocfs2_try_to_write_inline_data fs/ocfs2/aops.c:1584 [inline] ffff0000f2980650 (sb_internal#5){.+.+}-{0:0}, at: ocfs2_write_begin_nolock+0x920/0x3a44 fs/ocfs2/aops.c:1670 but task is already holding lock: ffff0000f5fd94a0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_write_begin+0x194/0x31c fs/ocfs2/aops.c:1902 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}: down_read+0x64/0x300 kernel/locking/rwsem.c:1520 ocfs2_read_virt_blocks+0x238/0x8f0 fs/ocfs2/extent_map.c:984 ocfs2_read_dir_block fs/ocfs2/dir.c:508 [inline] ocfs2_find_entry_el fs/ocfs2/dir.c:715 [inline] ocfs2_find_entry+0x2e4/0x1d6c fs/ocfs2/dir.c:1091 ocfs2_find_files_on_disk+0x128/0x40c fs/ocfs2/dir.c:1995 ocfs2_lookup_ino_from_name+0x60/0x114 fs/ocfs2/dir.c:2017 ocfs2_find_victim_alloc_group+0x1a0/0x7f0 fs/ocfs2/move_extents.c:385 ocfs2_move_extent fs/ocfs2/move_extents.c:656 [inline] __ocfs2_move_extents_range+0x1518/0x29c8 fs/ocfs2/move_extents.c:866 ocfs2_move_extents+0x328/0x818 fs/ocfs2/move_extents.c:938 ocfs2_ioctl_move_extents+0x410/0x5e8 fs/ocfs2/move_extents.c:1064 ocfs2_ioctl+0x220/0xb44 fs/ocfs2/ioctl.c:930 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #1 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x64/0x300 kernel/locking/rwsem.c:1520 ocfs2_start_trans+0x374/0x6cc fs/ocfs2/journal.c:374 ocfs2_mknod+0xd1c/0x2110 fs/ocfs2/namei.c:361 ocfs2_create+0x19c/0x4f8 fs/ocfs2/namei.c:674 lookup_open fs/namei.c:3490 [inline] open_last_lookups fs/namei.c:3558 [inline] path_openat+0xe18/0x26bc fs/namei.c:3788 do_filp_open+0x194/0x384 fs/namei.c:3818 do_sys_openat2+0x134/0x3f4 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] __arm64_sys_openat+0x118/0x14c fs/open.c:1347 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #0 (sb_internal#5){.+.+}-{0:0}: check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2880/0x6800 kernel/locking/lockdep.c:5049 lock_acquire+0x20c/0x63c kernel/locking/lockdep.c:5662 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+0x20c/0x6cc fs/ocfs2/journal.c:372 ocfs2_write_begin_inline fs/ocfs2/aops.c:1481 [inline] ocfs2_try_to_write_inline_data fs/ocfs2/aops.c:1584 [inline] ocfs2_write_begin_nolock+0x920/0x3a44 fs/ocfs2/aops.c:1670 ocfs2_write_begin+0x1b8/0x31c fs/ocfs2/aops.c:1904 generic_perform_write+0x234/0x4f4 mm/filemap.c:3862 __generic_file_write_iter+0x130/0x250 mm/filemap.c:3960 ocfs2_file_write_iter+0x138c/0x1c64 fs/ocfs2/file.c:2469 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x3ec/0x7f0 fs/read_write.c:584 ksys_write+0x12c/0x224 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 other info that might help us debug this: Chain exists of: sb_internal#5 --> &journal->j_trans_barrier --> &ocfs2_file_ip_alloc_sem_key Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_file_ip_alloc_sem_key); lock(&journal->j_trans_barrier); lock(&ocfs2_file_ip_alloc_sem_key); lock(sb_internal#5); *** DEADLOCK *** 4 locks held by syz.0.325/5358: #0: ffff0000d0312368 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x114/0x16c fs/file.c:1038 #1: ffff0000f2980460 (sb_writers#24){.+.+}-{0:0}, at: vfs_write+0x244/0x7f0 fs/read_write.c:580 #2: ffff0000f5fd9808 (&sb->s_type->i_mutex_key#30){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #2: ffff0000f5fd9808 (&sb->s_type->i_mutex_key#30){+.+.}-{3:3}, at: ocfs2_file_write_iter+0x39c/0x1c64 fs/ocfs2/file.c:2399 #3: ffff0000f5fd94a0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_write_begin+0x194/0x31c fs/ocfs2/aops.c:1902 stack backtrace: CPU: 0 PID: 5358 Comm: syz.0.325 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: dump_backtrace+0x1c0/0x1ec arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048 check_noncircular+0x264/0x2f8 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2880/0x6800 kernel/locking/lockdep.c:5049 lock_acquire+0x20c/0x63c kernel/locking/lockdep.c:5662 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+0x20c/0x6cc fs/ocfs2/journal.c:372 ocfs2_write_begin_inline fs/ocfs2/aops.c:1481 [inline] ocfs2_try_to_write_inline_data fs/ocfs2/aops.c:1584 [inline] ocfs2_write_begin_nolock+0x920/0x3a44 fs/ocfs2/aops.c:1670 ocfs2_write_begin+0x1b8/0x31c fs/ocfs2/aops.c:1904 generic_perform_write+0x234/0x4f4 mm/filemap.c:3862 __generic_file_write_iter+0x130/0x250 mm/filemap.c:3960 ocfs2_file_write_iter+0x138c/0x1c64 fs/ocfs2/file.c:2469 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x3ec/0x7f0 fs/read_write.c:584 ksys_write+0x12c/0x224 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 (syz.0.325,5358,0):ocfs2_change_extent_flag:5208 ERROR: Owner 17058 tried to clear 1 flags on an extent that didn't have them (syz.0.325,5358,0):ocfs2_mark_extent_written:5272 ERROR: status = -5 (syz.0.325,5358,0):ocfs2_write_cluster:1163 ERROR: status = -5 (syz.0.325,5358,0):ocfs2_write_cluster_by_desc:1248 ERROR: status = -5 (syz.0.325,5358,0):ocfs2_write_begin_nolock:1820 ERROR: status = -5 (syz.0.325,5358,0):ocfs2_write_begin:1907 ERROR: status = -5 OCFS2: ERROR (device loop0): int ocfs2_get_clusters_nocache(struct inode *, struct buffer_head *, u32, unsigned int *, struct ocfs2_extent_rec *, unsigned int *): Inode 17058 has bad extent record (0, 1, 0) On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: File system is now read-only. (syz.0.325,5358,0):ocfs2_get_clusters:624 ERROR: status = -30 (syz.0.325,5358,0):ocfs2_populate_write_desc:1407 ERROR: status = -30 (syz.0.325,5358,0):ocfs2_write_begin_nolock:1712 ERROR: status = -30 (syz.0.325,5358,0):ocfs2_write_begin:1907 ERROR: status = -30