============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.0.635/7185 is trying to acquire lock: ffff88805fd022e0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_read_virt_blocks+0x240/0x8e0 fs/ocfs2/extent_map.c:984 but task is already holding lock: ffff888074eacda0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_move_extents+0x6d8/0xdc0 fs/ocfs2/move_extents.c:969 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ocfs2_file_ip_alloc_sem_key); lock( &ocfs2_file_ip_alloc_sem_key); *** DEADLOCK *** May be due to missing lock nesting notation 10 locks held by syz.0.635/7185: #0: ffff888024f70460 (sb_writers #24){.+.+}-{0:0} , at: mnt_want_write_file+0x5c/0x200 fs/namespace.c:430 #1: ffff888074ead108 (&sb->s_type->i_mutex_key#31){+.+.}-{3:3} , at: inode_lock include/linux/fs.h:795 [inline] , at: ocfs2_move_extents+0x1d7/0xdc0 fs/ocfs2/move_extents.c:920 #2: ffff888074eacda0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3} , at: ocfs2_move_extents+0x6d8/0xdc0 fs/ocfs2/move_extents.c:969 #3: ffff88805faa1898 (&new->rf_sem ){+.+.}-{3:3}, at: __ocfs2_lock_refcount_tree fs/ocfs2/refcounttree.c:459 [inline] ){+.+.}-{3:3}, at: ocfs2_lock_refcount_tree+0x15f/0x990 fs/ocfs2/refcounttree.c:492 #4: ffff88805fd06d88 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #3){+.+.}-{3:3} , at: inode_lock include/linux/fs.h:795 [inline] , at: ocfs2_reserve_suballoc_bits+0x16d/0x44b0 fs/ocfs2/suballoc.c:804 #5: ffff88805fd05108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #5){+.+.}-{3:3} , at: inode_lock include/linux/fs.h:795 [inline] , at: ocfs2_move_extent fs/ocfs2/move_extents.c:640 [inline] , at: __ocfs2_move_extents_range+0x131f/0x3450 fs/ocfs2/move_extents.c:868 #6: ffff888074ea9808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:795 [inline] #6){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:648 [inline] #6){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x1a31/0x3450 fs/ocfs2/move_extents.c:868 #7: ffff888024f70650 (sb_internal#6){.+.+}-{0:0} , at: ocfs2_move_extent fs/ocfs2/move_extents.c:650 [inline] , at: __ocfs2_move_extents_range+0x1a42/0x3450 fs/ocfs2/move_extents.c:868 #8: ffff8880254bb0e8 (&journal->j_trans_barrier){.+.+}-{3:3}, at: ocfs2_start_trans+0x3a6/0x6f0 fs/ocfs2/journal.c:384 #9: ffff888065fc6990 ( jbd2_handle){++++}-{0:0} , at: start_this_handle+0x12d5/0x1560 fs/jbd2/transaction.c:462 stack backtrace: CPU: 0 PID: 7185 Comm: syz.0.635 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3053 [inline] validate_chain kernel/locking/lockdep.c:3847 [inline] __lock_acquire+0x68d3/0x7e20 kernel/locking/lockdep.c:5134 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5751 down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 ocfs2_read_virt_blocks+0x240/0x8e0 fs/ocfs2/extent_map.c:984 ocfs2_read_dir_block fs/ocfs2/dir.c:508 [inline] ocfs2_find_entry_el fs/ocfs2/dir.c:776 [inline] ocfs2_find_entry+0x39d/0x1f90 fs/ocfs2/dir.c:1152 ocfs2_find_files_on_disk+0xdb/0x2f0 fs/ocfs2/dir.c:2056 ocfs2_lookup_ino_from_name+0x4f/0xf0 fs/ocfs2/dir.c:2078 ocfs2_find_victim_alloc_group+0x19e/0x960 fs/ocfs2/move_extents.c:385 ocfs2_move_extent fs/ocfs2/move_extents.c:658 [inline] __ocfs2_move_extents_range+0x1c72/0x3450 fs/ocfs2/move_extents.c:868 ocfs2_move_extents+0x6ea/0xdc0 fs/ocfs2/move_extents.c:971 ocfs2_ioctl_move_extents+0x3a7/0x590 fs/ocfs2/move_extents.c:1067 ocfs2_ioctl+0x31f/0x7a0 fs/ocfs2/ioctl.c:947 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 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 RIP: 0033:0x7f2d1b239519 Code: ff c3 66 2e 0f 1f 84 00 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 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2d19486028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2d1b4c5fa0 RCX: 00007f2d1b239519 RDX: 0000200000005f80 RSI: 0000000040406f06 RDI: 0000000000000005 RBP: 00007f2d1b2c9136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2d1b4c6038 R14: 00007f2d1b4c5fa0 R15: 00007ffd26c01bf8 kcov: kcov_task_exit: t = ffff888026338000, kcov->t = ffff888026338000