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: 625d, last: 5d03h
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 82 2d16h 622d 0/3 upstream: reported C repro on 2023/03/22 23:14
linux-4.14 possible deadlock in hfs_find_init hfs C 1 645d 678d 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 640d 705d 0/1 upstream: reported C repro on 2022/12/30 06:08
upstream possible deadlock in hfs_find_init (2) hfs C error 1861 2h09m 708d 0/28 upstream: reported C repro on 2022/12/27 00:59
upstream possible deadlock in hfs_find_init hfs C done error 1 1427d 2417d 20/28 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 OK (0) job log log
2024/03/01 08:32 1h46m bisect fix linux-6.1.y OK (0) job log log
2024/01/12 02:26 1h32m bisect fix linux-6.1.y OK (0) job log log
2023/11/24 08:17 1h20m bisect fix linux-6.1.y OK (0) job log log
2023/10/21 06:28 1h26m bisect fix linux-6.1.y OK (0) job log 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 (101):
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/11/10 08:51 linux-6.1.y d7039b844a1c 6b856513 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 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/11/21 02:42 linux-6.1.y b67dc5c9ade9 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/11/07 13:56 linux-6.1.y 7c15117f9468 867e44df .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/11/06 02:30 linux-6.1.y 7c15117f9468 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfs_find_init
2024/08/03 08:15 linux-6.1.y 48d525b0e463 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan 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/11/29 19:02 linux-6.1.y e4d90d63d385 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/11/10 07:48 linux-6.1.y d7039b844a1c 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/11/08 03:47 linux-6.1.y 7c15117f9468 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/11/02 15:42 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/11/02 07:09 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/30 13:21 linux-6.1.y 7ec6f9fa3d97 fb888278 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/29 13:22 linux-6.1.y 7ec6f9fa3d97 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/27 03:02 linux-6.1.y 7ec6f9fa3d97 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/25 12:46 linux-6.1.y 7ec6f9fa3d97 045e728d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/23 02:42 linux-6.1.y 7ec6f9fa3d97 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/17 19:08 linux-6.1.y 54d90d17e8ce 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/16 19:24 linux-6.1.y aa4cd140bba5 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/11 22:17 linux-6.1.y aa4cd140bba5 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/03 18:38 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/10/03 03:36 linux-6.1.y aa4cd140bba5 a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/09/30 18:52 linux-6.1.y aa4cd140bba5 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/09/23 11:23 linux-6.1.y e526b12bf916 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/09/18 22:13 linux-6.1.y e526b12bf916 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/09/03 01:18 linux-6.1.y 311d8503ef9f 8045124c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/08/22 06:12 linux-6.1.y ee5e09825b81 ca02180f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/08/14 17:55 linux-6.1.y 117ac406ba90 e6b88e20 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/08/12 14:09 linux-6.1.y 36790ef5e00b 842184b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/08/11 15:27 linux-6.1.y 36790ef5e00b 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/08/01 11:20 linux-6.1.y c1cec4dad96b 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/07/25 11:44 linux-6.1.y c18e82d3ee44 466a14e5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/07/24 18:58 linux-6.1.y 9b3f9a5b12dc d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfs_find_init
2024/07/08 23:01 linux-6.1.y 7753af06eebf cde64f7d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 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
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
* Struck through repros no longer work on HEAD.