Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fs: ext4: initialize fsdata in pagecache_write()

When aops->write_begin() does not initialize fsdata, KMSAN reports
an error passing the latter to aops->write_end().

Fix this by unconditionally initializing fsdata.

Cc: Eric Biggers <ebiggers@kernel.org>
Fixes: c93d8f885809 ("ext4: add basic fs-verity support")
Reported-by: syzbot+9767be679ef5016b6082@syzkaller.appspotmail.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20221121112134.407362-1-glider@google.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org

authored by

Alexander Potapenko and committed by
Theodore Ts'o
956510c0 131294c3

+1 -1
+1 -1
fs/ext4/verity.c
··· 79 79 size_t n = min_t(size_t, count, 80 80 PAGE_SIZE - offset_in_page(pos)); 81 81 struct page *page; 82 - void *fsdata; 82 + void *fsdata = NULL; 83 83 int res; 84 84 85 85 res = aops->write_begin(NULL, mapping, pos, n, &page, &fsdata);