syzbot


possible deadlock in hfs_find_init

Status: upstream: reported C repro on 2023/03/20 17:38
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+6cc76a2d7d5627cfdabc@syzkaller.appspotmail.com
First crash: 458d, last: 4d14h
Bug presence (1)
Date Name Commit Repro Result
2023/09/15 upstream (ToT) 9fdfb15a3dbf C [report] INFO: task hung in hfs_find_init
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in hfs_find_init origin:upstream C error 34 3d04h 456d 0/3 upstream: reported C repro on 2023/03/22 23:14
linux-4.14 possible deadlock in hfs_find_init hfs C 1 478d 511d 0/1 upstream: reported C repro on 2023/01/26 19:14
linux-4.19 possible deadlock in hfs_find_init hfs C error 7 473d 538d 0/1 upstream: reported C repro on 2022/12/30 06:08
upstream possible deadlock in hfs_find_init (2) hfs C error 758 2h23m 542d 0/27 upstream: reported C repro on 2022/12/27 00:59
upstream possible deadlock in hfs_find_init hfs C done error 1 1260d 2251d 20/27 fixed on 2021/11/10 00:50
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2024/03/31 17:17 2h15m bisect fix linux-6.1.y job log (0) log
2024/03/01 08:32 1h46m bisect fix linux-6.1.y job log (0) log
2024/01/12 02:26 1h32m bisect fix linux-6.1.y job log (0) log
2023/11/24 08:17 1h20m bisect fix linux-6.1.y job log (0) log
2023/10/21 06:28 1h26m bisect fix linux-6.1.y job log (0) log

Sample crash report:
loop0: detected capacity change from 0 to 64
============================================
WARNING: possible recursive locking detected
6.1.53-syzkaller #0 Not tainted
--------------------------------------------
syz-executor225/3542 is trying to acquire lock:
ffff8880760700b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0

but task is already holding lock:
ffff8880760700b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0

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-executor225/3542:
 #0: ffff8880745f6460 (sb_writers#9){.+.+}-{0:0}, at: vfs_write+0x269/0xba0 fs/read_write.c:580
 #1: ffff888073e882a8 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline]
 #1: ffff888073e882a8 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: generic_file_write_iter+0x7f/0x310 mm/filemap.c:3911
 #2: ffff888073e880f8 (&HFS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xfb/0x1440 fs/hfs/extent.c:397
 #3: ffff8880760700b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0
 #4: ffff88807c0d80f8 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xfb/0x1440 fs/hfs/extent.c:397

stack backtrace:
CPU: 0 PID: 3542 Comm: syz-executor225 Not tainted 6.1.53-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline]
 check_deadlock kernel/locking/lockdep.c:3026 [inline]
 validate_chain+0x4726/0x58e0 kernel/locking/lockdep.c:3811
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5048
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5661
 __mutex_lock_common+0x1d4/0x2520 kernel/locking/mutex.c:603
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 hfs_find_init+0x16a/0x1e0
 hfs_ext_read_extent fs/hfs/extent.c:200 [inline]
 hfs_extend_file+0x317/0x1440 fs/hfs/extent.c:401
 hfs_bmap_reserve+0xd5/0x3f0 fs/hfs/btree.c:234
 __hfs_ext_write_extent+0x22e/0x4f0 fs/hfs/extent.c:121
 __hfs_ext_cache_extent+0x6a/0x990 fs/hfs/extent.c:174
 hfs_ext_read_extent fs/hfs/extent.c:202 [inline]
 hfs_extend_file+0x340/0x1440 fs/hfs/extent.c:401
 hfs_get_block+0x3e0/0xb60 fs/hfs/extent.c:353
 __block_write_begin_int+0x544/0x1a30 fs/buffer.c:1991
 __block_write_begin fs/buffer.c:2041 [inline]
 block_write_begin+0x98/0x1f0 fs/buffer.c:2102
 cont_write_begin+0x63f/0x880 fs/buffer.c:2456
 hfs_write_begin+0x86/0xd0 fs/hfs/inode.c:58
 generic_perform_write+0x2fc/0x5e0 mm/filemap.c:3754
 __generic_file_write_iter+0x176/0x400 mm/filemap.c:3882
 generic_file_write_iter+0xab/0x310 mm/filemap.c:3914
 call_write_iter include/linux/fs.h:2205 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x7ae/0xba0 fs/read_write.c:584
 ksys_write+0x19c/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fb7a1be4639
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe85fca118 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007ffe85fca2e8 RCX: 00007fb7a1be4639
RDX: 000000000208e24b RSI: 0000000020000180 RDI: 0000000000000004
RBP: 00007fb7a1c57610 R08: 0000000000000000 R09: 00007ffe85fca2e8
R10: 00000000000002ba R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe85fca2d8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (56):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/14 14:26 linux-6.1.y 09045dae0d90 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/04/06 01:54 linux-6.1.y 347385861c50 77230c29 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/01/21 20:03 linux-6.1.y 8fd7f4462453 9bd8dcda .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/09/15 22:59 linux-6.1.y 09045dae0d90 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/06/17 03:18 linux-6.1.y ca87e77a2ef8 f3921d4d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/06/16 12:01 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/06/11 10:28 linux-6.1.y 88690811da69 b7d9eb04 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/06/08 15:38 linux-6.1.y 88690811da69 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/06/02 22:11 linux-6.1.y 88690811da69 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/06/01 13:38 linux-6.1.y 88690811da69 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/27 04:35 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/27 04:35 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/27 04:26 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/27 04:25 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/27 04:23 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/27 04:23 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/17 17:40 linux-6.1.y 4078fa637fcd a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/11 13:10 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/08 08:51 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/05/08 08:18 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/04/21 16:31 linux-6.1.y 6741e066ec76 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/04/16 13:36 linux-6.1.y cd5d98c0556c 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/04/08 05:02 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/04/08 03:51 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/04/07 16:53 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/04/02 07:21 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2023/12/12 11:20 linux-6.1.y e7cddbb41b63 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2023/12/01 21:36 linux-6.1.y 6ac30d748bb0 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/06/15 11:09 linux-6.1.y ae9f2a70d69e f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/06/14 06:19 linux-6.1.y ae9f2a70d69e a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/06/08 20:18 linux-6.1.y 88690811da69 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/05/27 05:10 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/05/27 05:09 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/05/13 22:11 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/05/06 08:59 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/04/25 07:59 linux-6.1.y 6741e066ec76 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/04/20 14:24 linux-6.1.y 6741e066ec76 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/03/20 17:38 linux-6.1.y 7eaef76fbc46 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2023/08/29 21:07 linux-6.1.y 024f76bca9d0 ce731e62 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/07/26 15:53 linux-6.1.y 5302e81aa209 41fe1bae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/06/15 16:34 linux-6.1.y ca87e77a2ef8 90d4044e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/06/15 12:27 linux-6.1.y ca87e77a2ef8 90d4044e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/05/28 01:07 linux-6.1.y a343b0dd87b4 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/04/24 05:27 linux-6.1.y f17b0ab65d17 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/04/23 04:56 linux-6.1.y f17b0ab65d17 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/04/22 23:05 linux-6.1.y f17b0ab65d17 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/04/17 21:49 linux-6.1.y 0102425ac76b 436577a9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/04/17 14:45 linux-6.1.y 0102425ac76b c6ec7083 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2023/04/16 12:51 linux-6.1.y 0102425ac76b ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
* Struck through repros no longer work on HEAD.