============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.5.1152/15626 is trying to acquire lock:
ffff8881201580a0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18e/0x300

but task is already holding lock:
ffff8881201580a0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18e/0x300

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.5.1152/15626:
 #0: ffff88812015a480 (sb_writers#24){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90
 #1: ffff8881131b0300 (&sb->s_type->i_mutex_key#38){+.+.}-{4:4}, at: do_truncate+0x18f/0x250
 #2: ffff8881131b0128 (&HFS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf2/0x15e0
 #3: ffff8881201580a0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x18e/0x300
 #4: ffff8881131b1628 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xf2/0x15e0

stack backtrace:
CPU: 1 UID: 0 PID: 15626 Comm: syz.5.1152 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_deadlock_bug+0x279/0x290
 __lock_acquire+0x255f/0x2d10
 lock_acquire+0x106/0x350
 mutex_lock_nested+0x5a/0x1d0
 hfs_find_init+0x18e/0x300
 hfs_extend_file+0x35c/0x15e0
 hfs_bmap_reserve+0x107/0x430
 __hfs_ext_write_extent+0x1fa/0x470
 __hfs_ext_cache_extent+0x6b/0x9b0
 hfs_extend_file+0x39b/0x15e0
 hfs_get_block+0x412/0xc50
 __block_write_begin_int+0x6c6/0x1910
 cont_write_begin+0x737/0xae0
 hfs_write_begin+0x66/0xb0
 cont_write_begin+0x2e7/0xae0
 hfs_write_begin+0x66/0xb0
 hfs_file_truncate+0x1cf/0xb70
 hfs_inode_setattr+0x4a9/0x670
 notify_change+0xc18/0xf60
 do_truncate+0x1c2/0x250
 vfs_truncate+0x4b7/0x540
 ksys_truncate+0xf3/0x1c0
 __x64_sys_truncate+0x5b/0x70
 do_syscall_64+0x15f/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb5f5fecdd9
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:00007fb5f423e028 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
RAX: ffffffffffffffda RBX: 00007fb5f6265fa0 RCX: 00007fb5f5fecdd9
RDX: 0000000000000000 RSI: 0000000002fffffd RDI: 0000200000000940
RBP: 00007fb5f6082d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb5f6266038 R14: 00007fb5f6265fa0 R15: 00007fff452bc338
 </TASK>
Oops: general protection fault, probably for non-canonical address 0xdffffc000000015b: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000ad8-0x0000000000000adf]
CPU: 1 UID: 0 PID: 15626 Comm: syz.5.1152 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:do_raw_spin_lock+0x73/0x2f0
Code: c7 44 24 30 e0 1d a1 81 4c 8d 64 24 20 49 c1 ec 03 48 b8 f1 f1 f1 f1 f8 f3 f3 f3 49 89 04 14 4c 8d 77 04 4c 89 f0 48 c1 e8 03 <0f> b6 04 10 84 c0 0f 85 f3 01 00 00 41 8b 06 3d ad 4e ad de 0f 85
RSP: 0018:ffffc90008916b20 EFLAGS: 00010003
RAX: 000000000000015b RBX: 0000000000000ad8 RCX: 0000000080000003
RDX: dffffc0000000000 RSI: ffffffff8ba85b40 RDI: 0000000000000ad8
RBP: ffffc90008916be0 R08: 0000000000000001 R09: 0000000000000000
R10: dffffc0000000000 R11: fffffbfff1f1597f R12: 1ffff92001122d68
R13: ffffc90008916ce0 R14: 0000000000000adc R15: 0000000000000ad8
FS:  00007fb5f423e6c0(0000) GS:ffff8882a9f1f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555563142a68 CR3: 0000000111092000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 remove_waiter+0x138/0xb10
 rt_mutex_slowlock+0x72d/0x780
 mutex_lock_nested+0x168/0x1d0
 hfs_find_init+0x18e/0x300
 hfs_extend_file+0x35c/0x15e0
 hfs_bmap_reserve+0x107/0x430
 __hfs_ext_write_extent+0x1fa/0x470
 __hfs_ext_cache_extent+0x6b/0x9b0
 hfs_extend_file+0x39b/0x15e0
 hfs_get_block+0x412/0xc50
 __block_write_begin_int+0x6c6/0x1910
 cont_write_begin+0x737/0xae0
 hfs_write_begin+0x66/0xb0
 cont_write_begin+0x2e7/0xae0
 hfs_write_begin+0x66/0xb0
 hfs_file_truncate+0x1cf/0xb70
 hfs_inode_setattr+0x4a9/0x670
 notify_change+0xc18/0xf60
 do_truncate+0x1c2/0x250
 vfs_truncate+0x4b7/0x540
 ksys_truncate+0xf3/0x1c0
 __x64_sys_truncate+0x5b/0x70
 do_syscall_64+0x15f/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb5f5fecdd9
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:00007fb5f423e028 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
RAX: ffffffffffffffda RBX: 00007fb5f6265fa0 RCX: 00007fb5f5fecdd9
RDX: 0000000000000000 RSI: 0000000002fffffd RDI: 0000200000000940
RBP: 00007fb5f6082d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb5f6266038 R14: 00007fb5f6265fa0 R15: 00007fff452bc338
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:do_raw_spin_lock+0x73/0x2f0
Code: c7 44 24 30 e0 1d a1 81 4c 8d 64 24 20 49 c1 ec 03 48 b8 f1 f1 f1 f1 f8 f3 f3 f3 49 89 04 14 4c 8d 77 04 4c 89 f0 48 c1 e8 03 <0f> b6 04 10 84 c0 0f 85 f3 01 00 00 41 8b 06 3d ad 4e ad de 0f 85
RSP: 0018:ffffc90008916b20 EFLAGS: 00010003
RAX: 000000000000015b RBX: 0000000000000ad8 RCX: 0000000080000003
RDX: dffffc0000000000 RSI: ffffffff8ba85b40 RDI: 0000000000000ad8
RBP: ffffc90008916be0 R08: 0000000000000001 R09: 0000000000000000
R10: dffffc0000000000 R11: fffffbfff1f1597f R12: 1ffff92001122d68
R13: ffffc90008916ce0 R14: 0000000000000adc R15: 0000000000000ad8
FS:  00007fb5f423e6c0(0000) GS:ffff8882a9f1f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555563142a68 CR3: 0000000111092000 CR4: 00000000000006f0
