loop0: detected capacity change from 0 to 1024 hfsplus: found bad thread record in catalog Buffer I/O error on dev loop0, logical block 43, async page read Buffer I/O error on dev loop0, logical block 44, async page read Buffer I/O error on dev loop0, logical block 45, async page read Buffer I/O error on dev loop0, logical block 46, async page read hfsplus: xattr searching failed hfsplus: xattr searching failed Buffer I/O error on dev loop0, logical block 7, async page read Buffer I/O error on dev loop0, logical block 8, async page read Buffer I/O error on dev loop0, logical block 9, async page read Buffer I/O error on dev loop0, logical block 10, async page read Buffer I/O error on dev loop0, logical block 11, async page read Buffer I/O error on dev loop0, logical block 12, async page read hfsplus: xattr searching failed hfsplus: xattr searching failed hfsplus: xattr searching failed hfsplus: xattr searching failed ============================================ WARNING: possible recursive locking detected 6.16.0-rc6-syzkaller-00253-g4871b7cb27f4 #0 Not tainted -------------------------------------------- syz.0.0/5341 is trying to acquire lock: ffff88801a2ac0b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x15a/0x1d0 fs/hfsplus/bfind.c:28 but task is already holding lock: ffff88801a2ac0b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x15a/0x1d0 fs/hfsplus/bfind.c:28 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&tree->tree_lock/1); lock(&tree->tree_lock/1); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by syz.0.0/5341: #0: ffff88804456c428 (sb_writers#12){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3096 [inline] #0: ffff88804456c428 (sb_writers#12){.+.+}-{0:0}, at: vfs_writev+0x288/0x960 fs/read_write.c:1055 #1: ffff88805380c2f8 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:869 [inline] #1: ffff88805380c2f8 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: generic_file_write_iter+0xe3/0x540 mm/filemap.c:4252 #2: ffff88805380c108 (&hip->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1fc/0x1990 fs/hfsplus/extents.c:458 #3: ffff88801a2ac0b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x15a/0x1d0 fs/hfsplus/bfind.c:28 #4: ffff8880537cc108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1fc/0x1990 fs/hfsplus/extents.c:458 stack backtrace: CPU: 0 UID: 0 PID: 5341 Comm: syz.0.0 Not tainted 6.16.0-rc6-syzkaller-00253-g4871b7cb27f4 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_deadlock_bug+0x28b/0x2a0 kernel/locking/lockdep.c:3044 check_deadlock kernel/locking/lockdep.c:3096 [inline] validate_chain+0x1a3f/0x2140 kernel/locking/lockdep.c:3898 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __mutex_lock_common kernel/locking/mutex.c:602 [inline] __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747 hfsplus_find_init+0x15a/0x1d0 fs/hfsplus/bfind.c:28 hfsplus_ext_read_extent fs/hfsplus/extents.c:216 [inline] hfsplus_file_extend+0x416/0x1990 fs/hfsplus/extents.c:462 hfsplus_bmap_reserve+0x122/0x500 fs/hfsplus/btree.c:358 __hfsplus_ext_write_extent+0x28d/0x5b0 fs/hfsplus/extents.c:104 __hfsplus_ext_cache_extent+0x89/0xe30 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x444/0x1990 fs/hfsplus/extents.c:462 hfsplus_get_block+0x411/0x1530 fs/hfsplus/extents.c:245 __block_write_begin_int+0x6b2/0x1900 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x789/0xb50 fs/buffer.c:2601 hfsplus_write_begin+0x66/0xb0 fs/hfsplus/inode.c:46 generic_perform_write+0x2c4/0x910 mm/filemap.c:4112 generic_file_write_iter+0x10f/0x540 mm/filemap.c:4255 do_iter_readv_writev+0x56e/0x7f0 fs/read_write.c:-1 vfs_writev+0x31a/0x960 fs/read_write.c:1057 do_pwritev fs/read_write.c:1153 [inline] __do_sys_pwritev2 fs/read_write.c:1211 [inline] __se_sys_pwritev2+0x179/0x290 fs/read_write.c:1202 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f61a458e9a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f61a54a8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f61a47b5fa0 RCX: 00007f61a458e9a9 RDX: 0000000000000001 RSI: 0000200000001100 RDI: 0000000000000008 RBP: 00007f61a4610d69 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000007000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f61a47b5fa0 R15: 00007ffdd59884b8