============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
kworker/u8:62/2176 is trying to acquire lock:
ffff8880429400a0 (&tree->tree_lock#2/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1
but task is already holding lock:
ffff8880429400a0 (&tree->tree_lock#2/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&tree->tree_lock#2/1);
lock(&tree->tree_lock#2/1);
*** DEADLOCK ***
May be due to missing lock nesting notation
locks held by kworker/u8:62/2176: 4, on CPU#0:
#0: ffff88801fee5140 ((wq_completion)writeback){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#0: ffff88801fee5140 ((wq_completion)writeback){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffff88801fee5140 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3460 [inline]
#0: ffff88801fee5140 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3578
#1: ffffc9000849fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#1: ffffc9000849fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffc9000849fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3460 [inline]
#1: ffffc9000849fc40 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3578
#2: ffff8880429400a0 (&tree->tree_lock#2/1){+.+.}-{4:4}, at: hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1
#3: ffff888066b7c818 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf9/0x1680 fs/hfs/extent.c:403
stack backtrace:
CPU: 0 UID: 0 PID: 2176 Comm: kworker/u8:62 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Workqueue: writeback wb_workfn (flush-7:7)
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_deadlock_bug+0x27a/0x290 kernel/locking/lockdep.c:3085
check_deadlock kernel/locking/lockdep.c:3137 [inline]
validate_chain kernel/locking/lockdep.c:3939 [inline]
__lock_acquire+0x25db/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
__mutex_lock_common kernel/locking/rtmutex_api.c:561 [inline]
mutex_lock_nested+0x55/0x1d0 kernel/locking/rtmutex_api.c:580
hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1
hfs_ext_read_extent fs/hfs/extent.c:206 [inline]
hfs_extend_file+0x367/0x1680 fs/hfs/extent.c:407
hfs_bmap_reserve+0x108/0x430 fs/hfs/btree.c:402
__hfs_ext_write_extent+0x200/0x620 fs/hfs/extent.c:121
hfs_ext_write_extent+0x17d/0x210 fs/hfs/extent.c:150
hfs_write_inode+0x117/0xa00 fs/hfs/inode.c:475
write_inode fs/fs-writeback.c:1629 [inline]
__writeback_single_inode+0x6a0/0x1230 fs/fs-writeback.c:1872
writeback_sb_inodes+0x9db/0x1aa0 fs/fs-writeback.c:2120
wb_writeback+0x41c/0xad0 fs/fs-writeback.c:2305
wb_do_writeback fs/fs-writeback.c:2473 [inline]
wb_workfn+0x437/0x10f0 fs/fs-writeback.c:2518
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
------------[ cut here ]------------
rtmutex deadlock detected
WARNING: kernel/locking/rtmutex.c:1698 at rt_mutex_handle_deadlock+0x21/0xb0 kernel/locking/rtmutex.c:1698, CPU#0: kworker/u8:62/2176
Modules linked in:
CPU: 0 UID: 0 PID: 2176 Comm: kworker/u8:62 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Workqueue: writeback wb_workfn (flush-7:7)
RIP: 0010:rt_mutex_handle_deadlock+0x21/0xb0 kernel/locking/rtmutex.c:1698
Code: 90 90 90 90 90 90 90 90 90 41 57 41 56 41 55 41 54 53 83 ff dd 0f 85 81 00 00 00 48 89 f7 e8 76 42 01 00 48 8d 3d 1f 97 60 05 <67> 48 0f b9 3a 4c 8d 3d 00 00 00 00 65 48 8b 1d 03 f7 58 08 4c 8d
RSP: 0018:ffffc9000849eb30 EFLAGS: 00010286
RAX: 8000000000000000 RBX: 00000000ffffffdd RCX: ffffffff9ada7a01
RDX: 0000000000000001 RSI: ffffffff8bed3060 RDI: ffffffff90d8c010
RBP: ffffc9000849ecc8 R08: ffffffff90d5a8bf R09: 1ffffffff21ab517
R10: dffffc0000000000 R11: fffffbfff21ab518 R12: 1ffff92001093d74
R13: ffffffff8b782332 R14: ffff888042940048 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff88812470e000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8c58efde9c CR3: 00000000652ee000 CR4: 00000000003526f0
Call Trace:
__rt_mutex_slowlock kernel/locking/rtmutex.c:1760 [inline]
__rt_mutex_slowlock_locked kernel/locking/rtmutex.c:1787 [inline]
rt_mutex_slowlock+0x73e/0x780 kernel/locking/rtmutex.c:1827
__rt_mutex_lock kernel/locking/rtmutex.c:1842 [inline]
__mutex_lock_common kernel/locking/rtmutex_api.c:562 [inline]
mutex_lock_nested+0x163/0x1d0 kernel/locking/rtmutex_api.c:580
hfs_find_init+0x18d/0x300 fs/hfs/bfind.c:-1
hfs_ext_read_extent fs/hfs/extent.c:206 [inline]
hfs_extend_file+0x367/0x1680 fs/hfs/extent.c:407
hfs_bmap_reserve+0x108/0x430 fs/hfs/btree.c:402
__hfs_ext_write_extent+0x200/0x620 fs/hfs/extent.c:121
hfs_ext_write_extent+0x17d/0x210 fs/hfs/extent.c:150
hfs_write_inode+0x117/0xa00 fs/hfs/inode.c:475
write_inode fs/fs-writeback.c:1629 [inline]
__writeback_single_inode+0x6a0/0x1230 fs/fs-writeback.c:1872
writeback_sb_inodes+0x9db/0x1aa0 fs/fs-writeback.c:2120
wb_writeback+0x41c/0xad0 fs/fs-writeback.c:2305
wb_do_writeback fs/fs-writeback.c:2473 [inline]
wb_workfn+0x437/0x10f0 fs/fs-writeback.c:2518
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
----------------
Code disassembly (best guess):
0: 90 nop
1: 90 nop
2: 90 nop
3: 90 nop
4: 90 nop
5: 90 nop
6: 90 nop
7: 90 nop
8: 90 nop
9: 41 57 push %r15
b: 41 56 push %r14
d: 41 55 push %r13
f: 41 54 push %r12
11: 53 push %rbx
12: 83 ff dd cmp $0xffffffdd,%edi
15: 0f 85 81 00 00 00 jne 0x9c
1b: 48 89 f7 mov %rsi,%rdi
1e: e8 76 42 01 00 call 0x14299
23: 48 8d 3d 1f 97 60 05 lea 0x560971f(%rip),%rdi # 0x5609749
* 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2f: 4c 8d 3d 00 00 00 00 lea 0x0(%rip),%r15 # 0x36
36: 65 48 8b 1d 03 f7 58 mov %gs:0x858f703(%rip),%rbx # 0x858f741
3d: 08
3e: 4c rex.WR
3f: 8d .byte 0x8d