diff options
author | Alexander Potapenko <glider@google.com> | 2022-11-21 12:21:32 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-01-31 10:47:45 -0800 |
commit | b1b9896718bc1a212dc288ad66a5fa2fef11353d (patch) | |
tree | 246deafc147fc7a5bc9a10267f09beb2c1368a44 /fs/f2fs | |
parent | 9b13a8662ea61430005d3de3fc1d73e383b1ce5a (diff) | |
download | linux-b1b9896718bc1a212dc288ad66a5fa2fef11353d.tar.gz linux-b1b9896718bc1a212dc288ad66a5fa2fef11353d.tar.bz2 linux-b1b9896718bc1a212dc288ad66a5fa2fef11353d.zip |
fs: f2fs: initialize fsdata in pagecache_write()
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>
Diffstat (limited to 'fs/f2fs')
-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); |