* Re: possible fix (linux-ntfs3)
[not found] <b9136b92-fdeb-4a51-887d-4648560756ba@paragon-software.com>
@ 2024-09-02 12:22 ` syzbot
0 siblings, 0 replies; 2+ messages in thread
From: syzbot @ 2024-09-02 12:22 UTC (permalink / raw)
To: almaz.alexandrovich; +Cc: almaz.alexandrovich, linux-kernel, syzkaller-bugs
> #syz test:https://github.com/Paragon-Software-Group/linux-ntfs3.git master
unknown command "test:https://github.com/Paragon-Software-Group/linux-ntfs3.git"
>
> diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
> index 128d49512f5d..c08bbacc0030 100644
> --- a/fs/ntfs3/super.c
> +++ b/fs/ntfs3/super.c
> @@ -125,8 +125,9 @@ void ntfs_inode_printk(struct inode *inode, const
> char *fmt, ...)
>
> if (de) {
> spin_lock(&de->d_lock);
> - snprintf(name, sizeof(s_name_buf), " \"%s\"",
> - de->d_name.name);
> + if (snprintf(name, sizeof(s_name_buf), " \"%s\"",
> + de->d_name.name) >= sizeof(s_name_buf))
> + name[sizeof(s_name_buf) - 1] = 0;
> spin_unlock(&de->d_lock);
> } else {
> name[0] = 0;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: possible fix (linux-ntfs3)
[not found] <20240910065209.5664-1-almaz.alexandrovich@paragon-software.com>
@ 2024-09-10 6:52 ` syzbot
0 siblings, 0 replies; 2+ messages in thread
From: syzbot @ 2024-09-10 6:52 UTC (permalink / raw)
To: almaz.alexandrovich; +Cc: almaz.alexandrovich, linux-kernel, syzkaller-bugs
> #syz test: https://github.com/Paragon-Software-Group/linux-ntfs3.git master
This crash does not have a reproducer. I cannot test it.
>
> diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
> index 4fdcb5177ea1..eb935d4180c0 100644
> --- a/fs/ntfs3/file.c
> +++ b/fs/ntfs3/file.c
> @@ -1314,7 +1314,14 @@ static int ntfs_file_release(struct inode *inode, struct file *file)
> /* If we are last writer on the inode, drop the block reservation. */
> if (sbi->options->prealloc &&
> ((file->f_mode & FMODE_WRITE) &&
> - atomic_read(&inode->i_writecount) == 1)) {
> + atomic_read(&inode->i_writecount) == 1)
> + /*
> + * The only file when inode->i_fop = &ntfs_file_operations and
> + * init_rwsem(&ni->file.run_lock) is not called explicitly is MFT.
> + *
> + * Add additional check here.
> + */
> + && inode->i_ino != MFT_REC_MFT) {
> ni_lock(ni);
> down_write(&ni->file.run_lock);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-10 6:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <b9136b92-fdeb-4a51-887d-4648560756ba@paragon-software.com>
2024-09-02 12:22 ` possible fix (linux-ntfs3) syzbot
[not found] <20240910065209.5664-1-almaz.alexandrovich@paragon-software.com>
2024-09-10 6:52 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox