Re: [syzbot] [ntfs3?] KMSAN: uninit-value in longest_match_std (2)
From: Gautham Gujjula
Date: Mon Feb 03 2025 - 02:29:15 EST
#syz test
Hello,
I've been unable to reproduce the error from this patch test by running
ktest with my patch on top of 05dbaf8dd8bf ("Merge tag 'x86-urgent-2025-01-28'
of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") and 2014c95afece
("Linux 6.14-rc1"). Since the error appears in the boot sequence before
the actual reproducer executes, I don't believe this patch is the
suspect. I'll resubmit the patch for testing, and take a deeper look if
the problem reappears.
Thanks,
Gautham Gujjula
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index fad68ff0b6ed..6fc4f960f4d9 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -1122,6 +1122,13 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from)
}
goto out;
}
+ } else if (to & (frame_size - 1)) {
+ for (ip = to >> PAGE_SHIFT, off = offset_in_page(to);
+ ip < pages_per_frame;
+ ip++, off = 0) {
+ zero_user_segment(pages[ip], off, PAGE_SIZE);
+ flush_dcache_page(pages[ip]);
+ }
}
}