diff options
author | Alexander Potapenko <glider@google.com> | 2022-11-21 14:21:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 15:50:23 +0300 |
commit | 54e644b3d82f74a225b01900852da2f65fb00ec5 (patch) | |
tree | 1313898d8596e50256e4b390927eb865bc694687 /fs | |
parent | a3d1fd01250ffca88c11e9bd8d19be779acc7557 (diff) | |
download | linux-54e644b3d82f74a225b01900852da2f65fb00ec5.tar.xz |
fs: f2fs: initialize fsdata in pagecache_write()
[ Upstream commit b1b9896718bc1a212dc288ad66a5fa2fef11353d ]
When aops->write_begin() does not initialize fsdata, KMSAN may report
an error passing the latter to aops->write_end().
Fix this by unconditionally initializing fsdata.
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Fixes: 95ae251fe828 ("f2fs: add fs-verity support")
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/verity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/verity.c b/fs/f2fs/verity.c index c352fff88a5e..3f4f3295f1c6 100644 --- a/fs/f2fs/verity.c +++ b/fs/f2fs/verity.c @@ -81,7 +81,7 @@ static int pagecache_write(struct inode *inode, const void *buf, size_t count, size_t n = min_t(size_t, count, PAGE_SIZE - offset_in_page(pos)); struct page *page; - void *fsdata; + void *fsdata = NULL; int res; res = aops->write_begin(NULL, mapping, pos, n, &page, &fsdata); |