syzbot


possible deadlock in hfsplus_find_init

Status: upstream: reported C repro on 2022/12/22 07:31
Labels: hfs (incorrect?)
Reported-by: syzbot+f8ce6c197125ab9d72ce@syzkaller.appspotmail.com
First crash: 164d, last: 3d12h

Cause bisection: failed (error log, bisect log)

Fix bisection: failed (error log, bisect log)
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [hfsplus?] possible deadlock in hfsplus_find_init 0 (1) 2022/12/22 07:31
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 possible deadlock in hfsplus_find_init hfsplus C 4 88d 157d 0/1 upstream: reported C repro on 2022/12/27 19:37
linux-4.19 possible deadlock in hfsplus_find_init hfsplus C error 9 142d 181d 0/1 upstream: reported C repro on 2022/12/03 13:19
linux-6.1 possible deadlock in hfsplus_find_init origin:upstream C 37 18h38m 79d 0/3 upstream: reported C repro on 2023/03/15 11:24
linux-5.15 possible deadlock in hfsplus_find_init origin:upstream C 22 7h57m 57d 0/3 upstream: reported C repro on 2023/04/06 17:26

Sample crash report:
hfsplus: b-tree write err: -5, ino 8
============================================
WARNING: possible recursive locking detected
6.3.0-rc4-syzkaller-00199-g7b50567bdcad #0 Not tainted
--------------------------------------------
kworker/u4:1/11 is trying to acquire lock:
ffff88807d3c40b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x14a/0x1c0

but task is already holding lock:
ffff88807d3c40b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x14a/0x1c0

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 kworker/u4:1/11:
 #0: ffff888017813138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x77e/0x10e0 kernel/workqueue.c:2363
 #1: ffffc90000107d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7c8/0x10e0 kernel/workqueue.c:2365
 #2: ffff888027380108 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_ext_write_extent+0x8e/0x1f0 fs/hfsplus/extents.c:149
 #3: ffff88807d3c40b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x14a/0x1c0
 #4: ffff8880768b8108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1d6/0x1b10 fs/hfsplus/extents.c:457

stack backtrace:
CPU: 0 PID: 11 Comm: kworker/u4:1 Not tainted 6.3.0-rc4-syzkaller-00199-g7b50567bdcad #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: writeback wb_workfn (flush-7:0)
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2991 [inline]
 check_deadlock kernel/locking/lockdep.c:3034 [inline]
 validate_chain+0x472a/0x58e0 kernel/locking/lockdep.c:3819
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5056
 lock_acquire+0x1e1/0x520 kernel/locking/lockdep.c:5669
 __mutex_lock_common+0x1d8/0x2530 kernel/locking/mutex.c:603
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x1b/0x20 kernel/locking/mutex.c:799
 hfsplus_find_init+0x14a/0x1c0
 hfsplus_ext_read_extent fs/hfsplus/extents.c:216 [inline]
 hfsplus_file_extend+0x40e/0x1b10 fs/hfsplus/extents.c:461
 hfsplus_bmap_reserve+0x105/0x4e0 fs/hfsplus/btree.c:358
 __hfsplus_ext_write_extent+0x2a4/0x5b0 fs/hfsplus/extents.c:104
 hfsplus_ext_write_extent_locked fs/hfsplus/extents.c:139 [inline]
 hfsplus_ext_write_extent+0x16a/0x1f0 fs/hfsplus/extents.c:150
 hfsplus_write_inode+0x22/0x5e0 fs/hfsplus/super.c:154
 write_inode fs/fs-writeback.c:1453 [inline]
 __writeback_single_inode+0x69b/0xfb0 fs/fs-writeback.c:1665
 writeback_sb_inodes+0x8ef/0x11d0 fs/fs-writeback.c:1891
 wb_writeback+0x458/0xc70 fs/fs-writeback.c:2065
 wb_do_writeback fs/fs-writeback.c:2208 [inline]
 wb_workfn+0x400/0xff0 fs/fs-writeback.c:2248
 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390
 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537
 kthread+0x270/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

Crashes (227):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
2023/04/01 16:24 upstream 7b50567bdcad f325deb0 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/04/01 12:59 upstream 7b50567bdcad f325deb0 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/04/01 08:31 upstream 5a57b48fdfcb f325deb0 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root possible deadlock in hfsplus_find_init
2022/12/21 23:07 upstream b6bb9676f216 4067838e .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/27 03:32 upstream 91a304340a22 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/26 08:23 upstream 0d85b27b0cc6 b40ef614 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/26 00:24 upstream 9db898594c54 0513b3e6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/25 20:02 upstream 933174ae28ba 0513b3e6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in hfsplus_find_init
2023/05/25 16:45 upstream 933174ae28ba 0513b3e6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in hfsplus_find_init
2023/05/25 14:59 upstream 933174ae28ba 0513b3e6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/25 13:49 upstream 933174ae28ba 0513b3e6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in hfsplus_find_init
2023/05/25 05:16 upstream 933174ae28ba 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/25 02:01 upstream 933174ae28ba 4bce1a3e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfsplus_find_init
2023/05/22 15:01 upstream 44c026a73be8 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/21 05:57 upstream 0dd2a6fb1e34 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/20 00:32 upstream cbd6ac3837cd 96689200 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/19 05:35 upstream 2d1bcbc6cd70 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/18 02:32 upstream 1b66c114d161 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in hfsplus_find_init
2023/05/17 21:17 upstream 1b66c114d161 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/17 13:18 upstream f1fcbaa18b28 eaac4681 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/17 11:27 upstream f1fcbaa18b28 eaac4681 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in hfsplus_find_init
2023/05/17 09:12 upstream f1fcbaa18b28 eaac4681 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/17 07:36 upstream f1fcbaa18b28 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/16 21:42 upstream f1fcbaa18b28 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in hfsplus_find_init
2023/05/16 00:43 upstream f1fcbaa18b28 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/15 18:38 upstream f1fcbaa18b28 c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/15 13:59 upstream f1fcbaa18b28 c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/15 06:56 upstream f1fcbaa18b28 2b9ba477 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfsplus_find_init
2023/05/15 03:02 upstream f1fcbaa18b28 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/15 00:39 upstream bb7c241fae62 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/14 18:36 upstream 31f4104e392a 2b9ba477 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfsplus_find_init
2023/05/14 14:31 upstream bb7c241fae62 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/14 13:42 upstream bb7c241fae62 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/14 03:28 upstream bb7c241fae62 2b9ba477 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in hfsplus_find_init
2023/05/14 00:53 upstream d4d58949a6ea 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/13 23:17 upstream d4d58949a6ea 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/13 20:27 upstream d4d58949a6ea 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/13 17:50 upstream 9a48d6046722 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/09 11:32 upstream ba0ad6ed89fd 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/08 16:16 upstream ac9a78681b92 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/08 13:49 upstream ac9a78681b92 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in hfsplus_find_init
2023/05/08 10:22 upstream ac9a78681b92 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in hfsplus_find_init
2023/05/07 23:03 upstream 17784de648be 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/07 21:34 upstream 17784de648be 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/07 17:54 upstream fc4354c6e5c2 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/07 02:52 upstream fc4354c6e5c2 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in hfsplus_find_init
2023/05/06 22:32 upstream fc4354c6e5c2 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in hfsplus_find_init
2023/05/24 03:01 upstream 27e462c8fad4 4bce1a3e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in hfsplus_find_init
2023/05/24 23:30 linux-next 715abedee4cd 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/24 07:17 linux-next 715abedee4cd 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/15 08:27 linux-next 715abedee4cd 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/08 09:04 linux-next 52025ebbb518 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in hfsplus_find_init
2023/05/30 09:45 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci eb0f1697d729 8d5c7541 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfsplus_find_init
2023/05/25 19:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 0513b3e6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfsplus_find_init
2023/05/24 17:27 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 hfsplus_find_init
2023/05/16 19:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfsplus_find_init
2023/05/16 14:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in hfsplus_find_init
* Struck through repros no longer work on HEAD.