From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: Edward Adam Davis <eadavis@qq.com>,
<syzbot+bdeb22a4b9a09ab9aa45@syzkaller.appspotmail.com>
Cc: <linux-kernel@vger.kernel.org>, <ntfs3@lists.linux.dev>,
<penguin-kernel@I-love.SAKURA.ne.jp>,
<syzkaller-bugs@googlegroups.com>
Subject: Re: [PATCH Next] ntfs3: init run lock for extend inode
Date: Thu, 20 Nov 2025 10:02:42 +0100 [thread overview]
Message-ID: <ff8ad5a8-e5ae-46e3-897f-5de546759244@paragon-software.com> (raw)
In-Reply-To: <tencent_F24B651BC22523BA92BB5A337D9E2A1B5F08@qq.com>
On 9/16/25 07:50, Edward Adam Davis wrote:
> After setting the inode mode of $Extend to a regular file, executing the
> truncate system call will enter the do_truncate() routine, causing the
> run_lock uninitialized error reported by syzbot.
>
> Prior to patch 4e8011ffec79, if the inode mode of $Extend was not set to
> a regular file, the do_truncate() routine would not be entered.
>
> Add the run_lock initialization when loading $Extend.
>
> syzbot reported:
> INFO: trying to register non-static key.
> Call Trace:
> dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
> assign_lock_key+0x133/0x150 kernel/locking/lockdep.c:984
> register_lock_class+0x105/0x320 kernel/locking/lockdep.c:1299
> __lock_acquire+0x99/0xd20 kernel/locking/lockdep.c:5112
> lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
> down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590
> ntfs_set_size+0x140/0x200 fs/ntfs3/inode.c:860
> ntfs_extend+0x1d9/0x970 fs/ntfs3/file.c:387
> ntfs_setattr+0x2e8/0xbe0 fs/ntfs3/file.c:808
>
> Fixes: 4e8011ffec79 ("ntfs3: pretend $Extend records as regular files")
> Reported-by: syzbot+bdeb22a4b9a09ab9aa45@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=bdeb22a4b9a09ab9aa45
> Tested-by: syzbot+bdeb22a4b9a09ab9aa45@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
> ---
> fs/ntfs3/inode.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
> index 3959f23c487a..180cd984339b 100644
> --- a/fs/ntfs3/inode.c
> +++ b/fs/ntfs3/inode.c
> @@ -472,6 +472,7 @@ static struct inode *ntfs_read_mft(struct inode *inode,
> /* Records in $Extend are not a files or general directories. */
> inode->i_op = &ntfs_file_inode_operations;
> mode = S_IFREG;
> + init_rwsem(&ni->file.run_lock);
> } else {
> err = -EINVAL;
> goto out;
Taken, thanks. Will be sent in the next pull request.
Regards,
Konstantin
prev parent reply other threads:[~2025-11-20 9:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 18:17 [syzbot] [ntfs3?] INFO: trying to register non-static key in ntfs_set_size syzbot
2025-09-16 3:33 ` Edward Adam Davis
2025-09-16 4:01 ` syzbot
2025-09-16 3:48 ` Tetsuo Handa
2025-09-20 9:42 ` Tetsuo Handa
2025-10-04 10:43 ` Tetsuo Handa
2025-09-16 5:50 ` [PATCH Next] ntfs3: init run lock for extend inode Edward Adam Davis
2025-11-20 9:02 ` Konstantin Komarov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff8ad5a8-e5ae-46e3-897f-5de546759244@paragon-software.com \
--to=almaz.alexandrovich@paragon-software.com \
--cc=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=syzbot+bdeb22a4b9a09ab9aa45@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®