syzbot


possible deadlock in hfsplus_find_init

Status: upstream: reported C repro on 2023/04/06 17:26
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+5da1fef4d17e09c820db@syzkaller.appspotmail.com
First crash: 556d, last: 13d
Fix bisection: failed (error log, bisect log)
  
Bug presence (1)
Date Name Commit Repro Result
2023/05/22 upstream (ToT) 44c026a73be8 C [report] possible deadlock in hfsplus_find_init
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 587d 656d 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 641d 680d 0/1 upstream: reported C repro on 2022/12/03 13:19
linux-6.1 possible deadlock in hfsplus_find_init origin:upstream C 74 37d 578d 0/3 upstream: reported C repro on 2023/03/15 11:24
upstream possible deadlock in hfsplus_find_init hfs C error error 477 1h05m 661d 0/28 upstream: reported C repro on 2022/12/22 07:31
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2024/09/18 01:59 1m bisect fix linux-5.15.y error job log
2024/03/30 23:25 1h24m bisect fix linux-5.15.y OK (0) job log log
2024/01/29 07:24 1h24m bisect fix linux-5.15.y OK (0) job log log
2023/12/16 06:43 58m bisect fix linux-5.15.y OK (0) job log log
2023/11/15 12:25 57m bisect fix linux-5.15.y OK (0) job log log
2023/10/13 02:24 1h44m bisect fix linux-5.15.y OK (0) job log log
2023/09/01 10:05 1h45m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
============================================
WARNING: possible recursive locking detected
5.15.112-syzkaller #0 Not tainted
--------------------------------------------
kworker/u4:2/154 is trying to acquire lock:
ffff888078b6a0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0

but task is already holding lock:
ffff888078b6a0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/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:2/154:
 #0: ffff888014184938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2280
 #1: ffffc900010bfd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2282
 #2: ffff8880157f2988 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_ext_write_extent+0x8a/0x1f0 fs/hfsplus/extents.c:149
 #3: ffff888078b6a0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0
 #4: ffff8880157f0108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1d2/0x1b10 fs/hfsplus/extents.c:457

stack backtrace:
CPU: 0 PID: 154 Comm: kworker/u4:2 Not tainted 5.15.112-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Workqueue: writeback wb_workfn (flush-7:0)
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:2946 [inline]
 check_deadlock kernel/locking/lockdep.c:2989 [inline]
 validate_chain+0x46cf/0x58b0 kernel/locking/lockdep.c:3774
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 hfsplus_find_init+0x146/0x1c0
 hfsplus_ext_read_extent fs/hfsplus/extents.c:216 [inline]
 hfsplus_file_extend+0x40a/0x1b10 fs/hfsplus/extents.c:461
 hfsplus_bmap_reserve+0x101/0x4e0 fs/hfsplus/btree.c:357
 __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+0x166/0x1f0 fs/hfsplus/extents.c:150
 hfsplus_write_inode+0x1e/0x5c0 fs/hfsplus/super.c:154
 write_inode fs/fs-writeback.c:1478 [inline]
 __writeback_single_inode+0x644/0xe30 fs/fs-writeback.c:1683
 writeback_sb_inodes+0xbf0/0x1a50 fs/fs-writeback.c:1908
 wb_writeback+0x451/0xc50 fs/fs-writeback.c:2082
 wb_do_writeback fs/fs-writeback.c:2225 [inline]
 wb_workfn+0x46c/0x1130 fs/fs-writeback.c:2266
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2307
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2454
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Crashes (52):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/22 17:47 linux-5.15.y 9d6bde853685 4bce1a3e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2024/05/13 04:10 linux-5.15.y 284087d4f7d5 9026e142 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/05/12 16:15 linux-5.15.y 284087d4f7d5 9026e142 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/06/24 21:31 linux-5.15.y f67653019430 79782afc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/05/22 19:15 linux-5.15.y 9d6bde853685 4bce1a3e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2024/06/17 22:58 linux-5.15.y 4878aadf2d15 1f11cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2024/05/23 15:36 linux-5.15.y 83655231580b 4c2072ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2024/05/01 22:03 linux-5.15.y b925f60c6ee7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2024/04/28 05:02 linux-5.15.y b925f60c6ee7 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2024/04/27 19:49 linux-5.15.y b925f60c6ee7 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2024/04/26 12:13 linux-5.15.y c52b9710c83d 059e9963 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/12/29 06:12 linux-5.15.y d93fa2c78854 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2024/09/29 20:52 linux-5.15.y 3a5928702e71 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/08/18 19:20 linux-5.15.y 7e89efd3ae1c dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/08/17 00:59 linux-5.15.y 7e89efd3ae1c dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/08/03 00:12 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/07/21 13:14 linux-5.15.y 7c6d66f0266f b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/06/26 20:20 linux-5.15.y 4878aadf2d15 c6d33a01 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/06/25 16:54 linux-5.15.y 4878aadf2d15 04bd2a30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/06/07 21:58 linux-5.15.y c61bd26ae81a 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/05/19 04:17 linux-5.15.y 83655231580b c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/05/01 22:00 linux-5.15.y b925f60c6ee7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/05/01 04:25 linux-5.15.y b925f60c6ee7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/04/24 20:55 linux-5.15.y c52b9710c83d 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/04/14 23:35 linux-5.15.y fa3df276cd36 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/04/13 13:54 linux-5.15.y fa3df276cd36 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2024/02/29 15:07 linux-5.15.y 458ce51d0356 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/06/12 23:38 linux-5.15.y 7349e40704a0 aaed0183 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/06/11 00:41 linux-5.15.y 7349e40704a0 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/06/10 04:12 linux-5.15.y 7349e40704a0 9018a337 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/06/02 13:49 linux-5.15.y 0ab06468cbd1 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/05/30 22:32 linux-5.15.y 0ab06468cbd1 df37c7f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/05/26 01:35 linux-5.15.y 1fe619a7d252 0513b3e6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/05/25 09:26 linux-5.15.y 1fe619a7d252 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/05/15 14:52 linux-5.15.y b0ece631f84a c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/05/13 18:21 linux-5.15.y b0ece631f84a 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in hfsplus_find_init
2023/05/31 11:59 linux-5.15.y 0ab06468cbd1 09898419 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/05/31 08:08 linux-5.15.y 0ab06468cbd1 09898419 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/05/29 15:29 linux-5.15.y 1fe619a7d252 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/05/27 02:42 linux-5.15.y 1fe619a7d252 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/05/25 01:03 linux-5.15.y 1fe619a7d252 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/05/24 19:53 linux-5.15.y 1fe619a7d252 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/05/10 11:44 linux-5.15.y 8a7f2a5c5aa1 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/04/27 04:28 linux-5.15.y f48aeeaaa64c 19a3dabe .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/04/19 18:59 linux-5.15.y 4fdad925aa1a a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/04/18 21:56 linux-5.15.y 4fdad925aa1a d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/04/14 03:52 linux-5.15.y 4fdad925aa1a 3cfcaa1b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/04/14 00:48 linux-5.15.y 4fdad925aa1a 3cfcaa1b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/04/10 17:34 linux-5.15.y d86dfc4d95cd 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
2023/04/06 17:26 linux-5.15.y d86dfc4d95cd 08707520 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in hfsplus_find_init
* Struck through repros no longer work on HEAD.