syzbot


possible deadlock in mi_read

Status: upstream: reported C repro on 2023/03/17 09:05
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+e734ffa9b17a318863d2@syzkaller.appspotmail.com
First crash: 578d, last: 8h45m
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 11102 3h40m 745d 23/28 upstream: reported C repro on 2022/10/01 13:47
linux-5.15 possible deadlock in mi_read origin:upstream C 769 2d13h 581d 0/3 upstream: reported C repro on 2023/03/14 03:50

Sample crash report:
WARNING: The mand mount option has been deprecated and
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
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
6.1.70-syzkaller #0 Not tainted
--------------------------------------------
syz-executor146/3541 is trying to acquire lock:
ffff888071091e80 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
ffff888071091e80 (&ni->ni_lock/4){+.+.}-{3:3}, at: mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148

but task is already holding lock:
ffff888071096840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
ffff888071096840 (&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-executor146/3541:
 #0: ffff888071096ae0 (&type->i_mutex_dir_key#6){.+.+}-{3:3}, at: inode_lock_shared include/linux/fs.h:766 [inline]
 #0: ffff888071096ae0 (&type->i_mutex_dir_key#6){.+.+}-{3:3}, at: lookup_slow+0x45/0x70 fs/namei.c:1702
 #1: ffff888071096840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
 #1: ffff888071096840 (&ni->ni_lock/4){+.+.}-{3:3}, at: ntfs_lookup+0xf5/0x1f0 fs/ntfs3/namei.c:82

stack backtrace:
CPU: 1 PID: 3541 Comm: syz-executor146 Not tainted 6.1.70-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:2983 [inline]
 check_deadlock kernel/locking/lockdep.c:3026 [inline]
 validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
 ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
 mi_read+0x2dd/0x5a0 fs/ntfs3/record.c:148
 ntfs_read_mft fs/ntfs3/inode.c:69 [inline]
 ntfs_iget5+0x48a/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+0x27e/0x3d0 fs/namei.c:1686
 lookup_slow+0x53/0x70 fs/namei.c:1703
 walk_component+0x2d0/0x400 fs/namei.c:1994
 lookup_last fs/namei.c:2451 [inline]
 path_lookupat+0x16f/0x450 fs/namei.c:2475
 filename_lookup+0x251/0x600 fs/namei.c:2504
 user_path_at_empty+0x3e/0x60 fs/namei.c:2877
 user_path_at include/linux/namei.h:57 [inline]
 path_getxattr+0xda/0x410 fs/xattr.c:748
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc410721639
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:00007fffecba21f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bf
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007fc410721639
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000002001f740
RBP: 00007fc4107b3610 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000

Crashes (792):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/05 00:55 linux-6.1.y a507f147e6f0 28c42cff .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/05/02 10:12 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/05/02 09:51 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/02/25 15:12 linux-6.1.y 81e1dc2f7001 8d446f15 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/01/28 00:52 linux-6.1.y 883d1a956208 cc4a4020 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/01/20 21:54 linux-6.1.y 8fd7f4462453 9bd8dcda .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/01/04 23:54 linux-6.1.y a507f147e6f0 28c42cff .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/09/25 17:34 linux-6.1.y d23900f974e0 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/09/13 21:35 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-arm64 possible deadlock in mi_read
2023/05/07 07:39 linux-6.1.y ca48fc16c493 90c93c40 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/06/04 10:16 linux-6.1.y d2869ace6eeb a4ae4f42 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in mi_read
2023/05/05 07:57 linux-6.1.y ca48fc16c493 518a39a6 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/15 10:23 linux-6.1.y aa4cd140bba5 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/15 08:40 linux-6.1.y aa4cd140bba5 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/15 04:15 linux-6.1.y aa4cd140bba5 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/12 07:09 linux-6.1.y aa4cd140bba5 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/11 22:27 linux-6.1.y aa4cd140bba5 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/11 06:45 linux-6.1.y aa4cd140bba5 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/10 16:36 linux-6.1.y aa4cd140bba5 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/10 03:46 linux-6.1.y aa4cd140bba5 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/08 15:47 linux-6.1.y aa4cd140bba5 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/08 05:18 linux-6.1.y aa4cd140bba5 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/03 16:40 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/03 04:07 linux-6.1.y aa4cd140bba5 a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/02 12:25 linux-6.1.y aa4cd140bba5 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/01 12:24 linux-6.1.y aa4cd140bba5 ea2b66a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/28 22:33 linux-6.1.y e526b12bf916 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/27 19:26 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/26 08:11 linux-6.1.y e526b12bf916 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/25 21:57 linux-6.1.y e526b12bf916 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/25 09:21 linux-6.1.y e526b12bf916 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/25 03:20 linux-6.1.y e526b12bf916 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/25 02:11 linux-6.1.y e526b12bf916 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/24 15:29 linux-6.1.y e526b12bf916 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/24 02:28 linux-6.1.y e526b12bf916 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/23 11:21 linux-6.1.y e526b12bf916 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/18 20:05 linux-6.1.y e526b12bf916 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/17 05:04 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/17 01:06 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/14 11:34 linux-6.1.y 5f55cad62cc9 c7e35043 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/13 13:59 linux-6.1.y 5f55cad62cc9 73e8a465 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/06 18:33 linux-6.1.y 699506173494 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/09/04 20:40 linux-6.1.y 699506173494 dfbe2ed4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
2024/10/10 03:42 linux-6.1.y aa4cd140bba5 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/10/02 14:01 linux-6.1.y aa4cd140bba5 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/18 19:05 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 mi_read
2024/09/17 08:29 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/14 21:42 linux-6.1.y 5f55cad62cc9 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/14 08:25 linux-6.1.y 5f55cad62cc9 c7e35043 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/13 02:59 linux-6.1.y 5f55cad62cc9 73e8a465 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/12 12:37 linux-6.1.y 5f55cad62cc9 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/11 19:25 linux-6.1.y 5ca5b389fddf d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/08 08:25 linux-6.1.y 5ca5b389fddf 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/06 15:43 linux-6.1.y 699506173494 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2024/09/05 10:26 linux-6.1.y 699506173494 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in mi_read
2023/03/17 09:05 linux-6.1.y 6449a0ba6843 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in mi_read
* Struck through repros no longer work on HEAD.