Hello,
syzbot found the following issue on:
HEAD commit: 7b232985052f Linux 5.15.199
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=16afea52580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=353ae28c40b35af5
dashboard link:
https://syzkaller.appspot.com/bug?extid=b4b6377d5ff1845d060d
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/97a23052e207/disk-7b232985.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/e9871fb1bda3/vmlinux-7b232985.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/b08e48f5be44/bzImage-7b232985.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+b4b637...@syzkaller.appspotmail.com
======================================================
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>
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup