syzbot


possible deadlock in hfs_find_init (2)

Status: upstream: reported C repro on 2022/12/27 00:59
Subsystems: hfs
[Documentation on labels]
Reported-by: syzbot+e390d66dda462b51fde1@syzkaller.appspotmail.com
First crash: 437d, last: 10d
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [hfs?] possible deadlock in hfs_find_init (2) 0 (2) 2023/01/22 05:22
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 8 42d 347d 0/3 upstream: reported C repro on 2023/03/22 23:14
linux-4.14 possible deadlock in hfs_find_init hfs C 1 370d 403d 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 365d 430d 0/1 upstream: reported C repro on 2022/12/30 06:08
linux-6.1 possible deadlock in hfs_find_init origin:upstream C 18 3d11h 350d 0/3 upstream: reported C repro on 2023/03/20 17:38
upstream possible deadlock in hfs_find_init hfs C done error 1 1152d 2142d 20/26 fixed on 2021/11/10 00:50
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/02/07 14:05 23m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/02/07 14:05 24m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/02/07 14:05 23m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/02/07 08:20 3h12m retest repro upstream OK log
2024/02/07 08:20 21m retest repro upstream OK log
2024/02/07 07:01 32m retest repro upstream OK log
2024/02/06 21:10 20m retest repro upstream OK log
2024/02/06 21:10 21m retest repro linux-next error OK
2024/01/04 12:42 12m retest repro upstream report log
2024/01/04 12:42 17m retest repro upstream report log

Sample crash report:
loop0: detected capacity change from 0 to 64
============================================
WARNING: possible recursive locking detected
6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0 Not tainted
--------------------------------------------
syz-executor275/5056 is trying to acquire lock:
ffff88807b0020b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16e/0x1f0

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

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-executor275/5056:
 #0: ffff88807b000418 (sb_writers#9){.+.+}-{0:0}, at: vfs_write+0x223/0xb20 fs/read_write.c:580
 #1: ffff888019f11628 (&sb->s_type->i_mutex_key#14){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:802 [inline]
 #1: ffff888019f11628 (&sb->s_type->i_mutex_key#14){+.+.}-{3:3}, at: generic_file_write_iter+0x83/0x310 mm/filemap.c:4036
 #2: ffff888019f11478 (&HFS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xff/0x1440 fs/hfs/extent.c:397
 #3: ffff88807b0020b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16e/0x1f0
 #4: ffff888019f100f8 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xff/0x1440 fs/hfs/extent.c:397

stack backtrace:
CPU: 0 PID: 5056 Comm: syz-executor275 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 check_deadlock kernel/locking/lockdep.c:3062 [inline]
 validate_chain+0x15dd/0x5ab0 kernel/locking/lockdep.c:3856
 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137
 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747
 hfs_find_init+0x16e/0x1f0
 hfs_ext_read_extent fs/hfs/extent.c:200 [inline]
 hfs_extend_file+0x31b/0x1440 fs/hfs/extent.c:401
 hfs_bmap_reserve+0xd9/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+0x344/0x1440 fs/hfs/extent.c:401
 hfs_get_block+0x3e4/0xb60 fs/hfs/extent.c:353
 __block_write_begin_int+0x54d/0x1ad0 fs/buffer.c:2119
 __block_write_begin fs/buffer.c:2168 [inline]
 block_write_begin+0x9b/0x1e0 fs/buffer.c:2227
 cont_write_begin+0x643/0x880 fs/buffer.c:2582
 hfs_write_begin+0x8a/0xd0 fs/hfs/inode.c:58
 generic_perform_write+0x31b/0x630 mm/filemap.c:3918
 generic_file_write_iter+0xaf/0x310 mm/filemap.c:4039
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x792/0xb20 fs/read_write.c:584
 ksys_write+0x1a0/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f9cb29b65f9
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:00007ffc0ea2d9a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0032656c69662f2e RCX: 00007f9cb29b65f9
RDX: 00000000000ffe00 RSI: 0000000020004200 RDI: 0000000000000004
RBP: 00007f9cb2a29610 R08: 0000000000000000 R09: 00007ffc0ea2db78
R10: 00000000000002a0 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc0ea2db68 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (110):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/07 14:13 upstream bee0e7762ad2 0a02ce36 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in hfs_find_init
2023/10/06 03:56 upstream 3006adf3be79 db17ad9f .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/16 20:58 upstream 40f71e7cd3c6 f3921d4d .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in hfs_find_init
2023/01/22 10:53 upstream 2241ab53cbb5 cc0f9968 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in hfs_find_init
2023/05/22 17:51 linux-next 715abedee4cd 4bce1a3e .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root possible deadlock in hfs_find_init
2023/12/21 12:26 upstream 1a44b0073b92 4f9530a3 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci-upstream-kasan-gce-root possible deadlock in hfs_find_init
2023/09/30 09:03 upstream 71e58659bfc0 8e26a358 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root possible deadlock in hfs_find_init
2023/07/28 15:25 upstream 57012c57536f 92476829 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root possible deadlock in hfs_find_init
2023/07/16 18:36 upstream 831fe284d827 35d9ecc5 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root possible deadlock in hfs_find_init
2023/12/15 10:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci d5b235ec8eab 3222d10c .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/06/17 01:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 177239177378 f3921d4d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/01/22 05:21 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci edb2f0dc90f2 559a440a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2024/02/23 13:09 upstream ffd2cb6b718e 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in hfs_find_init
2023/12/03 01:53 upstream 1b8af6552cb7 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/12/01 21:27 upstream 994d5c58e50e f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2024/02/16 15:55 upstream 4f5e5092fdbf 578f7538 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfs_find_init
2024/02/13 14:36 upstream c664e16bb1ba e66542d7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfs_find_init
2024/01/22 16:22 upstream 6613476e225e 9bd8dcda .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfs_find_init
2024/01/08 04:07 upstream 0dd3ee311255 d0304e9c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfs_find_init
2023/12/06 07:34 upstream bee0e7762ad2 858d62d1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfs_find_init
2023/11/29 09:50 upstream 18d46e76d7c2 1adfb6f6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfs_find_init
2024/01/23 08:34 upstream 7ed2632ec7d7 1c0ecc51 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in hfs_find_init
2024/01/08 17:45 upstream 0dd3ee311255 4c0fd4bb .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in hfs_find_init
2023/12/12 14:10 upstream 26aff849438c ebcad15c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in hfs_find_init
2023/08/23 13:37 upstream 89bf6209cad6 b81ca3f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/08/22 19:28 upstream 53663f4103ff b81ca3f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/08/03 07:09 upstream ec351c8f2e62 39a91c18 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/08/02 15:48 upstream 5d0c230f1de8 b178af49 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/07/31 12:18 upstream 5d0c230f1de8 2a0d0f29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/07/31 06:34 upstream 5d0c230f1de8 2a0d0f29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/29 07:41 upstream b19edac5992d ca69c785 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/26 09:27 upstream 6995e2de6891 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/25 19:35 upstream 547cc9be86f4 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/24 20:22 upstream a92b7d26c743 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/23 21:11 upstream 8a28a0b6f1a1 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/23 03:15 upstream 8a28a0b6f1a1 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/22 01:34 upstream dad9774deaf1 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfs_find_init
2023/06/21 00:18 upstream 99ec1ed7c2ed 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in hfs_find_init
2023/06/20 02:06 upstream 692b7dc87ca6 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/19 00:43 upstream 8c1f0c38b310 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfs_find_init
2023/06/18 19:14 upstream 8c1f0c38b310 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/18 04:19 upstream 1b29d271614a f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfs_find_init
2023/06/16 01:01 upstream 62d8779610bb f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/12 08:51 upstream 858fd168a95c 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/10 17:20 upstream 64569520920a 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/05/22 06:25 upstream e2065b8c1b01 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/05/17 00:34 upstream f1fcbaa18b28 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/05/09 18:21 upstream ba0ad6ed89fd 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/05/05 02:02 upstream 1a5304fecee5 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/04/30 10:02 upstream 825a0714d2b3 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/04/29 22:09 upstream 1ae78a14516b 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/04/29 07:30 upstream 89d77f71f493 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2022/12/23 23:12 upstream 51094a24b85e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfs_find_init
2023/06/21 02:24 upstream e660abd551f1 79782afc .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in hfs_find_init
2023/06/13 04:31 upstream fb054096aea0 749afb64 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in hfs_find_init
2023/12/06 10:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci d46efae31672 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/09/16 12:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fe4469582053 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2022/12/23 00:50 linux-next e45fb347b630 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in hfs_find_init
2023/08/01 07:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2642b8a18760 2a0d0f29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/07/12 14:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 979d5fe2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/06/19 13:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 177239177378 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/06/04 04:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci eb0f1697d729 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/06/01 02:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci eb0f1697d729 babc4389 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/05/26 06:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 b40ef614 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/05/24 14:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
2023/05/16 03:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfs_find_init
* Struck through repros no longer work on HEAD.