public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [syzbot] [ntfs3?] possible deadlock in mi_read
       [not found] <f59e3f6ca8134a6b9735b5c0477e9c7f@paragon-software.com>
@ 2024-08-23 16:36 ` syzbot
  0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2024-08-23 16:36 UTC (permalink / raw)
  To: almaz.alexandrovich, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in mi_read

loop0: detected capacity change from 0 to 4096
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.11.0-rc1-syzkaller-00016-g7529036a025a #0 Not tainted
--------------------------------------------
syz.0.15/6171 is trying to acquire lock:
ffff8880746f9e60 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
ffff8880746f9e60 (&ni->ni_lock/5){+.+.}-{3:3}, at: mi_read+0x2e1/0x5a0 fs/ntfs3/record.c:148

but task is already holding lock:
ffff888074424318 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
ffff888074424318 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_lookup+0xf9/0x1f0 fs/ntfs3/namei.c:84

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

3 locks held by syz.0.15/6171:
 #0: ffff88802ede6420 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515
 #1: ffff8880744245b0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:799 [inline]
 #1: ffff8880744245b0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}, at: open_last_lookups fs/namei.c:3644 [inline]
 #1: ffff8880744245b0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}, at: path_openat+0x7fb/0x3470 fs/namei.c:3883
 #2: ffff888074424318 (&ni->ni_lock/5){+.+.}-{3:3}, at: ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
 #2: ffff888074424318 (&ni->ni_lock/5){+.+.}-{3:3}, at: ntfs_lookup+0xf9/0x1f0 fs/ntfs3/namei.c:84

stack backtrace:
CPU: 0 UID: 0 PID: 6171 Comm: syz.0.15 Not tainted 6.11.0-rc1-syzkaller-00016-g7529036a025a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
 check_deadlock kernel/locking/lockdep.c:3061 [inline]
 validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3855
 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
 __mutex_lock_common kernel/locking/mutex.c:608 [inline]
 __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
 ni_lock fs/ntfs3/ntfs_fs.h:1111 [inline]
 mi_read+0x2e1/0x5a0 fs/ntfs3/record.c:148
 ntfs_read_mft fs/ntfs3/inode.c:70 [inline]
 ntfs_iget5+0x478/0x3970 fs/ntfs3/inode.c:537
 dir_search_u+0x2fe/0x3a0 fs/ntfs3/dir.c:264
 ntfs_lookup+0x106/0x1f0 fs/ntfs3/namei.c:85
 lookup_open fs/namei.c:3556 [inline]
 open_last_lookups fs/namei.c:3647 [inline]
 path_openat+0x11cc/0x3470 fs/namei.c:3883
 do_filp_open+0x235/0x490 fs/namei.c:3913
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1416
 do_sys_open fs/open.c:1431 [inline]
 __do_sys_creat fs/open.c:1507 [inline]
 __se_sys_creat fs/open.c:1501 [inline]
 __x64_sys_creat+0x123/0x170 fs/open.c:1501
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1194977299
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f11957e1048 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007f1194b05f80 RCX: 00007f1194977299
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00007f11949e48e6 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f1194b05f80 R15: 00007ffe08e158c8
 </TASK>


Tested on:

commit:         7529036a fs/ntfs3: Rename ntfs3_setattr into ntfs_seta..
git tree:       https://github.com/Paragon-Software-Group/linux-ntfs3.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=151c35a3980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2258b49cd9b339fa
dashboard link: https://syzkaller.appspot.com/bug?extid=bc7ca0ae4591cb2550f9
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [syzbot] [ntfs3?] possible deadlock in mi_read
       [not found] <20240902131729.8411-1-almaz.alexandrovich@paragon-software.com>
@ 2024-09-02 14:18 ` syzbot
  0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2024-09-02 14:18 UTC (permalink / raw)
  To: almaz.alexandrovich, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+bc7ca0ae4591cb2550f9@syzkaller.appspotmail.com
Tested-by: syzbot+bc7ca0ae4591cb2550f9@syzkaller.appspotmail.com

Tested on:

commit:         7529036a fs/ntfs3: Rename ntfs3_setattr into ntfs_seta..
git tree:       https://github.com/Paragon-Software-Group/linux-ntfs3.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=176192fb980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2258b49cd9b339fa
dashboard link: https://syzkaller.appspot.com/bug?extid=bc7ca0ae4591cb2550f9
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=14586b47980000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [syzbot] [ntfs3?] possible deadlock in mi_read
       [not found] <ddcf93e3-df0d-442c-a490-f6607f313fe3@paragon-software.com>
@ 2024-10-16 11:32 ` syzbot
  0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2024-10-16 11:32 UTC (permalink / raw)
  To: almaz.alexandrovich, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+bc7ca0ae4591cb2550f9@syzkaller.appspotmail.com
Tested-by: syzbot+bc7ca0ae4591cb2550f9@syzkaller.appspotmail.com

Tested on:

commit:         2f87d091 Merge tag 'trace-ringbuffer-v6.12-rc3' of git..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15e1945f980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=164d2822debd8b0d
dashboard link: https://syzkaller.appspot.com/bug?extid=bc7ca0ae4591cb2550f9
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-16 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <f59e3f6ca8134a6b9735b5c0477e9c7f@paragon-software.com>
2024-08-23 16:36 ` [syzbot] [ntfs3?] possible deadlock in mi_read syzbot
     [not found] <20240902131729.8411-1-almaz.alexandrovich@paragon-software.com>
2024-09-02 14:18 ` syzbot
     [not found] <ddcf93e3-df0d-442c-a490-f6607f313fe3@paragon-software.com>
2024-10-16 11:32 ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox