syzbot


possible deadlock in mi_read

Status: upstream: reported C repro on 2023/03/14 03:50
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+de116336948b785c6555@syzkaller.appspotmail.com
First crash: 579d, last: 5h46m
Bug presence (1)
Date Name Commit Repro Result
2024/01/05 upstream (ToT) 1f874787ed9a C [report] possible deadlock in mi_read
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in mi_read ntfs3 C error 11101 3h08m 742d 22/28 upstream: reported C repro on 2022/10/01 13:47
linux-6.1 possible deadlock in mi_read origin:upstream C 787 1d03h 576d 0/3 upstream: reported C repro on 2023/03/17 09:05

Sample crash report:
ntfs3: loop0: Different NTFS' sector size (4096) and media sector size (512)
ntfs3: loop0: Mark volume as dirty due to NTFS errors
============================================
WARNING: possible recursive locking detected
5.15.145-syzkaller #0 Not tainted
--------------------------------------------
syz-executor222/3500 is trying to acquire lock:
ffff8880763e1e80 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline]
ffff8880763e1e80 (&ni->ni_lock/4){+.+.}-{3:3}, at: mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148

but task is already holding lock:
ffff8880763e6840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline]
ffff8880763e6840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf5/0x1f0 fs/ntfs3/namei.c:82

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&ni->ni_lock/4);
  lock(&ni->ni_lock/4);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor222/3500:
 #0: ffff8880763e6ae0 (&type->i_mutex_dir_key#6){.+.+}-{3:3}, at: inode_lock_shared include/linux/fs.h:797 [inline]
 #0: ffff8880763e6ae0 (&type->i_mutex_dir_key#6){.+.+}-{3:3}, at: lookup_slow+0x45/0x70 fs/namei.c:1679
 #1: ffff8880763e6840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline]
 #1: ffff8880763e6840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf5/0x1f0 fs/ntfs3/namei.c:82

stack backtrace:
CPU: 0 PID: 3500 Comm: syz-executor222 Not tainted 5.15.145-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/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:2946 [inline]
 check_deadlock kernel/locking/lockdep.c:2989 [inline]
 validate_chain+0x46d2/0x5930 kernel/locking/lockdep.c:3775
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 __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
 ni_lock fs/ntfs3/ntfs_fs.h:1110 [inline]
 mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148
 ntfs_read_mft fs/ntfs3/inode.c:69 [inline]
 ntfs_iget5+0x483/0x3900 fs/ntfs3/inode.c:524
 dir_search_u+0x2f6/0x390 fs/ntfs3/dir.c:264
 ntfs_lookup+0x102/0x1f0 fs/ntfs3/namei.c:83
 __lookup_slow+0x275/0x3d0 fs/namei.c:1663
 lookup_slow+0x53/0x70 fs/namei.c:1680
 walk_component+0x48c/0x610 fs/namei.c:1976
 lookup_last fs/namei.c:2431 [inline]
 path_lookupat+0x16f/0x450 fs/namei.c:2455
 filename_lookup+0x230/0x5c0 fs/namei.c:2484
 user_path_at_empty+0x40/0x180 fs/namei.c:2883
 user_path_at include/linux/namei.h:57 [inline]
 path_getxattr+0xac/0x240 fs/xattr.c:727
 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+0x61/0xcb
RIP: 0033:0x7f1fb203e639
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:00007fff06a8fa88 EFLAGS: 00000246 ORIG_RAX: 00000000000000bf
RAX: fffffff

Crashes (769):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/05 01:11 linux-5.15.y d93fa2c78854 28c42cff .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/07/31 00:07 linux-5.15.y 7e89efd3ae1c 6fde257d .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/07/30 14:18 linux-5.15.y 7e89efd3ae1c 5187fc86 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/04/12 12:45 linux-5.15.y cdfd0a7f0139 27de0a5c .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/04/05 20:49 linux-5.15.y 9465fef4ae35 77230c29 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/04/01 10:11 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2023/09/19 21:19 linux-5.15.y 35ecaa3632bf 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2023/05/10 01:15 linux-5.15.y 8a7f2a5c5aa1 30aa2a7e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2023/05/29 21:22 linux-5.15.y 1fe619a7d252 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in mi_read
2023/05/29 10:03 linux-5.15.y 1fe619a7d252 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in mi_read
2023/05/06 07:07 linux-5.15.y 8a7f2a5c5aa1 de870ca5 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/10/13 05:09 linux-5.15.y 3a5928702e71 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/10/11 23:12 linux-5.15.y 3a5928702e71 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/10/10 04:04 linux-5.15.y 3a5928702e71 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/10/07 11:36 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/10/06 23:35 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/10/06 00:19 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/10/03 19:17 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/10/02 15:31 linux-5.15.y 3a5928702e71 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/30 16:29 linux-5.15.y 3a5928702e71 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/28 05:54 linux-5.15.y 3a5928702e71 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/26 04:38 linux-5.15.y 3a5928702e71 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/25 09:52 linux-5.15.y 3a5928702e71 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/25 05:35 linux-5.15.y 3a5928702e71 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/25 05:35 linux-5.15.y 3a5928702e71 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/24 16:30 linux-5.15.y 3a5928702e71 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/23 23:34 linux-5.15.y 3a5928702e71 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/22 09:39 linux-5.15.y 3a5928702e71 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/20 03:43 linux-5.15.y 3a5928702e71 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/19 01:13 linux-5.15.y 3a5928702e71 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/14 00:57 linux-5.15.y 3a5928702e71 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/13 23:36 linux-5.15.y 3a5928702e71 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/09 09:43 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/09 05:57 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/08 14:04 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/03 01:38 linux-5.15.y fa93fa65db6e 8045124c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/09/02 18:06 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
2024/10/10 16:41 linux-5.15.y 3a5928702e71 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/10/07 18:25 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/10/06 07:42 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/10/06 03:04 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/10/05 19:04 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/10/04 17:23 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/22 23:51 linux-5.15.y 3a5928702e71 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/22 21:00 linux-5.15.y 3a5928702e71 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/19 19:02 linux-5.15.y 3a5928702e71 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/18 23:23 linux-5.15.y 3a5928702e71 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/16 15:18 linux-5.15.y 3a5928702e71 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/16 14:05 linux-5.15.y 3a5928702e71 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/16 12:22 linux-5.15.y 3a5928702e71 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/16 06:29 linux-5.15.y 3a5928702e71 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/15 20:27 linux-5.15.y 3a5928702e71 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/09 04:06 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/08 02:25 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/07 17:11 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/02 10:39 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2024/09/01 17:31 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in mi_read
2023/03/14 03:49 linux-5.15.y 2ddbd0f967b3 026e2200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in mi_read
* Struck through repros no longer work on HEAD.