loop0: detected capacity change from 0 to 1024 ============================================ WARNING: possible recursive locking detected 6.11.0-rc7-syzkaller-g5f5673607153 #0 Not tainted -------------------------------------------- syz-executor354/6405 is trying to acquire lock: ffff0000da621548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x2c4/0x1168 fs/hfsplus/extents.c:260 but task is already holding lock: ffff0000da6207c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1d0/0x1544 fs/hfsplus/extents.c:458 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&HFSPLUS_I(inode)->extents_lock); lock(&HFSPLUS_I(inode)->extents_lock); *** DEADLOCK *** May be due to missing lock nesting notation 7 locks held by syz-executor354/6405: #0: ffff0000d75f8420 (sb_writers#8){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:515 #1: ffff0000da621df8 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:835 [inline] #1: ffff0000da621df8 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: lock_rename fs/namei.c:3147 [inline] #1: ffff0000da621df8 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: do_renameat2+0x4ec/0xe40 fs/namei.c:5058 #2: ffff0000c66f82f8 (&sb->s_type->i_mutex_key#16){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:800 [inline] #2: ffff0000c66f82f8 (&sb->s_type->i_mutex_key#16){+.+.}-{3:3}, at: lock_two_nondirectories+0xd4/0x14c fs/inode.c:1170 #3: ffff0000c66f89b8 (&sb->s_type->i_mutex_key#16/4){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:835 [inline] #3: ffff0000c66f89b8 (&sb->s_type->i_mutex_key#16/4){+.+.}-{3:3}, at: lock_two_nondirectories+0xfc/0x14c fs/inode.c:1172 #4: ffff0000c2eea0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc fs/hfsplus/bfind.c:28 #5: ffff0000da6207c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1d0/0x1544 fs/hfsplus/extents.c:458 #6: ffff0000c253c8f8 (&sbi->alloc_mutex){+.+.}-{3:3}, at: hfsplus_block_allocate+0x90/0x824 fs/hfsplus/bitmap.c:35 stack backtrace: CPU: 1 UID: 0 PID: 6405 Comm: syz-executor354 Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:119 dump_stack+0x1c/0x28 lib/dump_stack.c:128 print_deadlock_bug+0x4e4/0x660 kernel/locking/lockdep.c:3011 check_deadlock kernel/locking/lockdep.c:3061 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x6160/0x779c kernel/locking/lockdep.c:5142 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5759 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 hfsplus_get_block+0x2c4/0x1168 fs/hfsplus/extents.c:260 block_read_full_folio+0x3c4/0xbe0 fs/buffer.c:2406 hfsplus_read_folio+0x28/0x38 fs/hfsplus/inode.c:28 filemap_read_folio+0x14c/0x39c mm/filemap.c:2355 do_read_cache_folio+0x114/0x548 mm/filemap.c:3789 do_read_cache_page mm/filemap.c:3855 [inline] read_cache_page+0x6c/0x15c mm/filemap.c:3864 read_mapping_page include/linux/pagemap.h:907 [inline] hfsplus_block_allocate+0xe0/0x824 fs/hfsplus/bitmap.c:37 hfsplus_file_extend+0x7b4/0x1544 fs/hfsplus/extents.c:469 hfsplus_bmap_reserve+0xec/0x474 fs/hfsplus/btree.c:358 hfsplus_rename_cat+0x1ac/0xf30 fs/hfsplus/catalog.c:456 hfsplus_rename+0x120/0x1b0 fs/hfsplus/dir.c:552 vfs_rename+0x9bc/0xc84 fs/namei.c:4966 do_renameat2+0x9c8/0xe40 fs/namei.c:5123 __do_sys_renameat2 fs/namei.c:5157 [inline] __se_sys_renameat2 fs/namei.c:5154 [inline] __arm64_sys_renameat2+0xd8/0xf4 fs/namei.c:5154 __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+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598