syzbot
possible deadlock in mi_read (2)
Status:
upstream: reported C repro on 2025/01/13 02:48
Bug presence:
origin:upstream
[Documentation on labels]
Reported-by: syzbot+c69c5ad75584648b282b@syzkaller.appspotmail.com
First crash: 571d, last: 16d
▶
▼
Bug presence (1)
| Date |
Name |
Commit |
Repro |
Result |
| 2025/01/13 |
upstream (ToT) |
5bc55a333a2f |
C
|
[report] possible deadlock in mi_read
|
▶
▼
Last patch testing requests (10)
▶
▼
Fix bisection attempts (4)
Sample crash report:
RBP: 00007f9312531090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f9313149038 R14: 00007f9313148fa0 R15: 00007ffeed9b5b98
</TASK>
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.17/4332 is trying to acquire lock:
ffff888068229e80 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1100 [inline]
ffff888068229e80 (&ni->ni_lock/5){+.+.}-{3:3}, at: mi_read+0x2cd/0x590 fs/ntfs3/record.c:148
but task is already holding lock:
ffff88806822efa0 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1100 [inline]
ffff88806822efa0 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_rename+0x70f/0xc50 fs/ntfs3/namei.c:315
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&ni->ni_lock/5);
lock(&ni->ni_lock/5);
*** DEADLOCK ***
May be due to missing lock nesting notation
6 locks held by syz.0.17/4332:
#0: ffff88802c7e4460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:386
#1: ffff88806822eae0 (&type->i_mutex_dir_key#8/1){+.+.}-{3:3}, at: lock_rename include/linux/fs.h:-1 [inline]
#1: ffff88806822eae0 (&type->i_mutex_dir_key#8/1){+.+.}-{3:3}, at: do_renameat2+0x43d/0xf60 fs/namei.c:4932
#2: ffff88806822f240 (&sb->s_type->i_mutex_key#21/4){+.+.}-{3:3}, at: vfs_rename+0x7e3/0x1100 fs/namei.c:4811
#3: ffff88806822e840 (&ni->ni_lock/6){+.+.}-{3:3}, at: ni_lock_dir fs/ntfs3/ntfs_fs.h:1105 [inline]
#3: ffff88806822e840 (&ni->ni_lock/6){+.+.}-{3:3}, at: ntfs_rename+0x6f9/0xc50 fs/ntfs3/namei.c:314
#4: ffff88806822efa0 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1100 [inline]
#4: ffff88806822efa0 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_rename+0x70f/0xc50 fs/ntfs3/namei.c:315
#5: ffff88802c7e2120 (&wnd->rw_lock/1){+.+.}-{3:3}, at: ntfs_look_free_mft+0x16d/0xd60 fs/ntfs3/fsntfs.c:542
stack backtrace:
CPU: 1 PID: 4332 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
__lock_acquire+0x1236/0x7d10 kernel/locking/lockdep.c:-1
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1e3/0x2400 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:1100 [inline]
mi_read+0x2cd/0x590 fs/ntfs3/record.c:148
mi_format_new+0x191/0x5c0 fs/ntfs3/record.c:374
ni_add_subrecord+0xcd/0x460 fs/ntfs3/frecord.c:372
ntfs_look_free_mft+0x4db/0xd60 fs/ntfs3/fsntfs.c:686
ni_create_attr_list+0x8f5/0x12a0 fs/ntfs3/frecord.c:852
ni_ins_attr_ext+0x381/0xa00 fs/ntfs3/frecord.c:953
ni_insert_attr fs/ntfs3/frecord.c:1120 [inline]
ni_insert_resident fs/ntfs3/frecord.c:1504 [inline]
ni_add_name+0x2e7/0x7f0 fs/ntfs3/frecord.c:3010
ni_rename+0x4b/0x130 fs/ntfs3/frecord.c:3050
ntfs_rename+0x737/0xc50 fs/ntfs3/namei.c:318
vfs_rename+0xbe1/0x1100 fs/namei.c:4840
do_renameat2+0x8b7/0xf60 fs/namei.c:4993
__do_sys_rename fs/namei.c:5039 [inline]
__se_sys_rename fs/namei.c:5037 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5037
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f9312ecf819
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f9312531028 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f9313148fa0 RCX: 00007f9312ecf819
RDX: 0000000000000000 RSI: 0000200000000180 RDI: 00002000000002c0
RBP: 00007f9312531090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f9313149038 R14: 00007f9313148fa0 R15: 00007ffeed9b5b98
</TASK>
* Struck through repros no longer work on HEAD.