loop1: detected capacity change from 0 to 1024 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.1.471/7086 is trying to acquire lock: ffff888025c0dc08 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x213/0x1af0 fs/hfsplus/extents.c:455 but task is already holding lock: ffff88802762a0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x154/0x1d0 fs/hfsplus/bfind.c:28 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&tree->tree_lock/1){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747 hfsplus_find_init+0x154/0x1d0 fs/hfsplus/bfind.c:28 hfsplus_ext_read_extent fs/hfsplus/extents.c:216 [inline] hfsplus_file_extend+0x46f/0x1af0 fs/hfsplus/extents.c:459 hfsplus_bmap_reserve+0x10b/0x510 fs/hfsplus/btree.c:358 hfsplus_create_cat+0x1c1/0x1070 fs/hfsplus/catalog.c:272 hfsplus_fill_super+0x1481/0x1e20 fs/hfsplus/super.c:579 mount_bdev+0x21c/0x2c0 fs/super.c:1651 legacy_get_tree+0xea/0x180 fs/fs_context.c:662 vfs_get_tree+0x8c/0x280 fs/super.c:1772 do_new_mount+0x24a/0xa40 fs/namespace.c:3386 do_mount fs/namespace.c:3726 [inline] __do_sys_mount fs/namespace.c:3935 [inline] __se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3912 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747 hfsplus_file_extend+0x213/0x1af0 fs/hfsplus/extents.c:455 hfsplus_bmap_reserve+0x10b/0x510 fs/hfsplus/btree.c:358 __hfsplus_ext_write_extent+0x264/0x520 fs/hfsplus/extents.c:104 __hfsplus_ext_cache_extent+0x81/0xbd0 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x4b9/0x1af0 fs/hfsplus/extents.c:459 hfsplus_get_block+0x421/0x1520 fs/hfsplus/extents.c:245 __block_write_begin_int+0x571/0x1b00 fs/buffer.c:2124 __block_write_begin fs/buffer.c:2173 [inline] block_write_begin+0x9a/0x1e0 fs/buffer.c:2234 cont_write_begin+0x5fd/0x800 fs/buffer.c:2591 hfsplus_write_begin+0x8b/0xd0 fs/hfsplus/inode.c:52 generic_perform_write+0x2fe/0x5c0 mm/filemap.c:4036 generic_file_write_iter+0xaf/0x2e0 mm/filemap.c:4157 call_write_iter include/linux/fs.h:2018 [inline] aio_write+0x564/0x7d0 fs/aio.c:1593 __io_submit_one fs/aio.c:-1 [inline] io_submit_one+0x768/0x12d0 fs/aio.c:2012 __do_sys_io_submit fs/aio.c:2071 [inline] __se_sys_io_submit+0x1a1/0x310 fs/aio.c:2041 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&tree->tree_lock/1); lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock/1); lock(&HFSPLUS_I(inode)->extents_lock); *** DEADLOCK *** 3 locks held by syz.1.471/7086: #0: ffff888025c0b040 (&sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline] #0: ffff888025c0b040 (&sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: generic_file_write_iter+0x83/0x2e0 mm/filemap.c:4154 #1: ffff888025c0ae88 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x213/0x1af0 fs/hfsplus/extents.c:455 #2: ffff88802762a0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x154/0x1d0 fs/hfsplus/bfind.c:28 stack backtrace: CPU: 1 PID: 7086 Comm: syz.1.471 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747 hfsplus_file_extend+0x213/0x1af0 fs/hfsplus/extents.c:455 hfsplus_bmap_reserve+0x10b/0x510 fs/hfsplus/btree.c:358 __hfsplus_ext_write_extent+0x264/0x520 fs/hfsplus/extents.c:104 __hfsplus_ext_cache_extent+0x81/0xbd0 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x4b9/0x1af0 fs/hfsplus/extents.c:459 hfsplus_get_block+0x421/0x1520 fs/hfsplus/extents.c:245 __block_write_begin_int+0x571/0x1b00 fs/buffer.c:2124 __block_write_begin fs/buffer.c:2173 [inline] block_write_begin+0x9a/0x1e0 fs/buffer.c:2234 cont_write_begin+0x5fd/0x800 fs/buffer.c:2591 hfsplus_write_begin+0x8b/0xd0 fs/hfsplus/inode.c:52 generic_perform_write+0x2fe/0x5c0 mm/filemap.c:4036 generic_file_write_iter+0xaf/0x2e0 mm/filemap.c:4157 call_write_iter include/linux/fs.h:2018 [inline] aio_write+0x564/0x7d0 fs/aio.c:1593 __io_submit_one fs/aio.c:-1 [inline] io_submit_one+0x768/0x12d0 fs/aio.c:2012 __do_sys_io_submit fs/aio.c:2071 [inline] __se_sys_io_submit+0x1a1/0x310 fs/aio.c:2041 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f5efbb9e559 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:00007f5efc9fb028 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 00007f5efbe25fa0 RCX: 00007f5efbb9e559 RDX: 0000200000000cc0 RSI: 000000000000003b RDI: 00007f5efc9d2000 RBP: 00007f5efbc358b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5efbe26038 R14: 00007f5efbe25fa0 R15: 00007ffc0f3d6638