syzbot


possible deadlock in hfsplus_file_extend (4)

Status: upstream: reported on 2026/02/11 15:48
Reported-by: syzbot+65d55898e6b1bd038d24@syzkaller.appspotmail.com
First crash: 3d11h, last: 1d05h
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 115d 118d 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 560d 1069d 3/3 fixed on 2024/09/08 06:54
linux-5.15 possible deadlock in hfsplus_file_extend (3) 4 10 94d 116d 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 4h07m 460d 0/29 upstream: reported C repro on 2024/11/11 11:50
linux-5.15 possible deadlock in hfsplus_file_extend (2) 4 7 438d 489d 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 1077d 1143d 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 4d05h 121d 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 1071d 3/3 fixed on 2024/09/23 09:27
linux-4.19 possible deadlock in hfsplus_file_extend hfsplus 4 C 258 1076d 1176d 0/1 upstream: reported C repro on 2022/11/26 10:00
linux-5.15 possible deadlock in hfsplus_file_extend (4) 4 3 4d00h 4d00h 0/3 upstream: reported on 2026/02/11 01:52
linux-6.1 possible deadlock in hfsplus_file_extend (2) 4 2 398d 398d 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 488d 1176d 28/29 fixed on 2024/10/21 12:45

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

but task is already holding lock:
ffff0000d50080b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc 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+0x190/0x1f60 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
       hfsplus_find_init+0x144/0x1bc fs/hfsplus/bfind.c:28
       hfsplus_file_truncate+0x2ec/0x9ac fs/hfsplus/extents.c:580
       hfsplus_delete_inode+0x160/0x20c fs/hfsplus/inode.c:-1
       hfsplus_unlink+0x418/0x68c fs/hfsplus/dir.c:405
       vfs_unlink+0x2e0/0x4f4 fs/namei.c:4330
       do_unlinkat+0x328/0x500 fs/namei.c:4398
       __do_sys_unlinkat fs/namei.c:4441 [inline]
       __se_sys_unlinkat fs/namei.c:4434 [inline]
       __arm64_sys_unlinkat+0xe0/0xfc fs/namei.c:4434
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
       do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
       el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

-> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3090 [inline]
       check_prevs_add kernel/locking/lockdep.c:3209 [inline]
       validate_chain kernel/locking/lockdep.c:3825 [inline]
       __lock_acquire+0x2880/0x6800 kernel/locking/lockdep.c:5049
       lock_acquire+0x20c/0x63c kernel/locking/lockdep.c:5662
       __mutex_lock_common+0x190/0x1f60 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
       hfsplus_file_extend+0x18c/0x13b4 fs/hfsplus/extents.c:455
       hfsplus_bmap_reserve+0xe8/0x494 fs/hfsplus/btree.c:358
       __hfsplus_ext_write_extent+0x1e0/0x49c fs/hfsplus/extents.c:104
       __hfsplus_ext_cache_extent+0x84/0xa84 fs/hfsplus/extents.c:186
       hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline]
       hfsplus_file_extend+0x3bc/0x13b4 fs/hfsplus/extents.c:459
       hfsplus_get_block+0x324/0x11a0 fs/hfsplus/extents.c:245
       __block_write_begin_int+0x350/0x1388 fs/buffer.c:1991
       __block_write_begin fs/buffer.c:2041 [inline]
       block_write_begin fs/buffer.c:2102 [inline]
       cont_write_begin+0x53c/0x780 fs/buffer.c:2456
       hfsplus_write_begin+0x98/0xe4 fs/hfsplus/inode.c:52
       generic_perform_write+0x234/0x4f4 mm/filemap.c:3862
       __generic_file_write_iter+0x130/0x250 mm/filemap.c:3960
       generic_file_write_iter+0xb4/0x2b0 mm/filemap.c:3989
       call_write_iter include/linux/fs.h:2265 [inline]
       new_sync_write fs/read_write.c:491 [inline]
       vfs_write+0x3ec/0x7f0 fs/read_write.c:584
       ksys_write+0x12c/0x224 fs/read_write.c:637
       __do_sys_write fs/read_write.c:649 [inline]
       __se_sys_write fs/read_write.c:646 [inline]
       __arm64_sys_write+0x7c/0x90 fs/read_write.c:646
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
       do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
       el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

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.0.569/6396:
 #0: ffff0000ce747768 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x114/0x16c fs/file.c:1038
 #1: ffff0000d500a460 (sb_writers#28){.+.+}-{0:0}, at: vfs_write+0x244/0x7f0 fs/read_write.c:580
 #2: ffff0000fbf6d400 (&sb->s_type->i_mutex_key#36){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
 #2: ffff0000fbf6d400 (&sb->s_type->i_mutex_key#36){+.+.}-{3:3}, at: generic_file_write_iter+0x84/0x2b0 mm/filemap.c:3986
 #3: ffff0000fbf6d208 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x18c/0x13b4 fs/hfsplus/extents.c:455
 #4: ffff0000d50080b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc fs/hfsplus/bfind.c:28

stack backtrace:
CPU: 0 PID: 6396 Comm: syz.0.569 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025
Call trace:
 dump_backtrace+0x1c0/0x1ec arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048
 check_noncircular+0x264/0x2f8 kernel/locking/lockdep.c:2170
 check_prev_add kernel/locking/lockdep.c:3090 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain kernel/locking/lockdep.c:3825 [inline]
 __lock_acquire+0x2880/0x6800 kernel/locking/lockdep.c:5049
 lock_acquire+0x20c/0x63c kernel/locking/lockdep.c:5662
 __mutex_lock_common+0x190/0x1f60 kernel/locking/mutex.c:603
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
 hfsplus_file_extend+0x18c/0x13b4 fs/hfsplus/extents.c:455
 hfsplus_bmap_reserve+0xe8/0x494 fs/hfsplus/btree.c:358
 __hfsplus_ext_write_extent+0x1e0/0x49c fs/hfsplus/extents.c:104
 __hfsplus_ext_cache_extent+0x84/0xa84 fs/hfsplus/extents.c:186
 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline]
 hfsplus_file_extend+0x3bc/0x13b4 fs/hfsplus/extents.c:459
 hfsplus_get_block+0x324/0x11a0 fs/hfsplus/extents.c:245
 __block_write_begin_int+0x350/0x1388 fs/buffer.c:1991
 __block_write_begin fs/buffer.c:2041 [inline]
 block_write_begin fs/buffer.c:2102 [inline]
 cont_write_begin+0x53c/0x780 fs/buffer.c:2456
 hfsplus_write_begin+0x98/0xe4 fs/hfsplus/inode.c:52
 generic_perform_write+0x234/0x4f4 mm/filemap.c:3862
 __generic_file_write_iter+0x130/0x250 mm/filemap.c:3960
 generic_file_write_iter+0xb4/0x2b0 mm/filemap.c:3989
 call_write_iter include/linux/fs.h:2265 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x3ec/0x7f0 fs/read_write.c:584
 ksys_write+0x12c/0x224 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:646
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/13 21:06 linux-6.1.y 8ce36b2849ef 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/12 16:49 linux-6.1.y 8ce36b2849ef 504cb1bf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/12 04:17 linux-6.1.y 8ce36b2849ef 76a109e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/12 00:55 linux-6.1.y 8ce36b2849ef 76a109e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/12 00:53 linux-6.1.y 8ce36b2849ef 76a109e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/11 15:47 linux-6.1.y 8ce36b2849ef 75707236 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
* Struck through repros no longer work on HEAD.