syzbot


possible deadlock in hfsplus_file_extend (4)

Status: upstream: reported on 2026/02/11 01:52
Reported-by: syzbot+b4b6377d5ff1845d060d@syzkaller.appspotmail.com
First crash: 4d16h, last: 4d16h
Similar bugs (12)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in hfsplus_file_extend (3) 4 4 116d 119d 0/3 auto-obsoleted due to no activity on 2026/01/30 04:03
linux-6.1 possible deadlock in hfsplus_file_extend origin:upstream missing-backport 4 C done 2760 561d 1070d 3/3 fixed on 2024/09/08 06:54
linux-5.15 possible deadlock in hfsplus_file_extend (3) 4 10 95d 117d 0/3 auto-obsoleted due to no activity on 2026/01/21 08:03
upstream possible deadlock in hfsplus_file_extend (2) hfs 4 C inconclusive 803 20h02m 461d 0/29 upstream: reported C repro on 2024/11/11 11:50
linux-5.15 possible deadlock in hfsplus_file_extend (2) 4 7 439d 490d 0/3 auto-obsoleted due to no activity on 2025/03/13 03:31
linux-4.14 possible deadlock in hfsplus_file_extend hfsplus 4 C 3 1078d 1144d 0/1 upstream: reported C repro on 2022/12/29 06:07
linux-6.6 possible deadlock in hfsplus_file_extend origin:upstream 4 C error 4 4d21h 122d 0/2 upstream: reported C repro on 2025/10/16 15:40
linux-5.15 possible deadlock in hfsplus_file_extend missing-backport origin:lts-only 4 C done 3439 545d 1072d 3/3 fixed on 2024/09/23 09:27
linux-6.1 possible deadlock in hfsplus_file_extend (4) 4 7 4h10m 4d02h 0/3 upstream: reported on 2026/02/11 15:48
linux-4.19 possible deadlock in hfsplus_file_extend hfsplus 4 C 258 1077d 1177d 0/1 upstream: reported C repro on 2022/11/26 10:00
linux-6.1 possible deadlock in hfsplus_file_extend (2) 4 2 399d 399d 0/3 auto-obsoleted due to no activity on 2025/04/22 11:08
upstream possible deadlock in hfsplus_file_extend hfs 4 C error done 31659 489d 1177d 28/29 fixed on 2024/10/21 12:45

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.4.1718/10942 is trying to acquire lock:
ffff88807d236648 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1cd/0x1a50 fs/hfsplus/extents.c:455

but task is already holding lock:
ffff8880789c40b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x150/0x1c0 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+0x1e3/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       hfsplus_find_init+0x150/0x1c0 fs/hfsplus/bfind.c:28
       hfsplus_file_truncate+0x3b6/0xb80 fs/hfsplus/extents.c:580
       hfsplus_delete_inode+0x17c/0x230 fs/hfsplus/inode.c:-1
       hfsplus_unlink+0x4f7/0x7b0 fs/hfsplus/dir.c:405
       vfs_unlink+0x385/0x600 fs/namei.c:4288
       do_unlinkat+0x391/0x710 fs/namei.c:4356
       __do_sys_unlinkat fs/namei.c:4399 [inline]
       __se_sys_unlinkat fs/namei.c:4392 [inline]
       __x64_sys_unlinkat+0xd1/0xe0 fs/namei.c:4392
       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

-> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain kernel/locking/lockdep.c:3788 [inline]
       __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
       lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
       __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       hfsplus_file_extend+0x1cd/0x1a50 fs/hfsplus/extents.c:455
       hfsplus_bmap_reserve+0x11e/0x4f0 fs/hfsplus/btree.c:357
       __hfsplus_ext_write_extent+0x28d/0x5b0 fs/hfsplus/extents.c:104
       __hfsplus_ext_cache_extent+0x89/0xe20 fs/hfsplus/extents.c:186
       hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline]
       hfsplus_file_extend+0x4be/0x1a50 fs/hfsplus/extents.c:459
       hfsplus_get_block+0x430/0x15a0 fs/hfsplus/extents.c:245
       __block_write_begin_int+0x565/0x15d0 fs/buffer.c:2012
       __block_write_begin fs/buffer.c:2062 [inline]
       block_write_begin fs/buffer.c:2122 [inline]
       cont_write_begin+0x598/0x7b0 fs/buffer.c:2471
       hfsplus_write_begin+0x92/0xe0 fs/hfsplus/inode.c:53
       generic_perform_write+0x2b6/0x550 mm/filemap.c:3785
       __generic_file_write_iter+0x25f/0x4e0 mm/filemap.c:3912
       generic_file_write_iter+0xa6/0x1b0 mm/filemap.c:3944
       call_write_iter include/linux/fs.h:2173 [inline]
       new_sync_write fs/read_write.c:507 [inline]
       vfs_write+0x745/0xd60 fs/read_write.c:594
       ksys_write+0x152/0x260 fs/read_write.c:647
       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

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 ***

5 locks held by syz.4.1718/10942:
 #0: ffff888078274870 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1056
 #1: ffff88801ee36460 (sb_writers#15){.+.+}-{0:0}, at: vfs_write+0x295/0xd60 fs/read_write.c:590
 #2: ffff88807d233240 (&sb->s_type->i_mutex_key
#23){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
#23){+.+.}-{3:3}, at: generic_file_write_iter+0x7e/0x1b0 mm/filemap.c:3941
 #3: ffff88807d233048 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1cd/0x1a50 fs/hfsplus/extents.c:455
 #4: ffff8880789c40b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x150/0x1c0 fs/hfsplus/bfind.c:28

stack backtrace:
CPU: 0 PID: 10942 Comm: syz.4.1718 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 hfsplus_file_extend+0x1cd/0x1a50 fs/hfsplus/extents.c:455
 hfsplus_bmap_reserve+0x11e/0x4f0 fs/hfsplus/btree.c:357
 __hfsplus_ext_write_extent+0x28d/0x5b0 fs/hfsplus/extents.c:104
 __hfsplus_ext_cache_extent+0x89/0xe20 fs/hfsplus/extents.c:186
 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline]
 hfsplus_file_extend+0x4be/0x1a50 fs/hfsplus/extents.c:459
 hfsplus_get_block+0x430/0x15a0 fs/hfsplus/extents.c:245
 __block_write_begin_int+0x565/0x15d0 fs/buffer.c:2012
 __block_write_begin fs/buffer.c:2062 [inline]
 block_write_begin fs/buffer.c:2122 [inline]
 cont_write_begin+0x598/0x7b0 fs/buffer.c:2471
 hfsplus_write_begin+0x92/0xe0 fs/hfsplus/inode.c:53
 generic_perform_write+0x2b6/0x550 mm/filemap.c:3785
 __generic_file_write_iter+0x25f/0x4e0 mm/filemap.c:3912
 generic_file_write_iter+0xa6/0x1b0 mm/filemap.c:3944
 call_write_iter include/linux/fs.h:2173 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x745/0xd60 fs/read_write.c:594
 ksys_write+0x152/0x260 fs/read_write.c:647
 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:0x7fe1ea5b6f79
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:00007fe1e8811028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fe1ea830fa0 RCX: 00007fe1ea5b6f79
RDX: 000000000208e24b RSI: 0000200000000040 RDI: 0000000000000004
RBP: 00007fe1ea64d7e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fe1ea831038 R14: 00007fe1ea830fa0 R15: 00007ffec0b021e8
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/11 01:52 linux-5.15.y 7b232985052f 441e25b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_file_extend
2026/02/11 01:52 linux-5.15.y 7b232985052f 441e25b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_file_extend
2026/02/11 01:51 linux-5.15.y 7b232985052f 441e25b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_file_extend
* Struck through repros no longer work on HEAD.