Skip to content

Commit eef034a

Browse files
ramosian-gliderkdave
authored andcommitted
affs: initialize fsdata in affs_truncate()
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. Fixes: f2b6a16 ("fs: affs convert to new aops") Suggested-by: Eric Biggers <[email protected]> Signed-off-by: Alexander Potapenko <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent b7bfaa7 commit eef034a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/affs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ affs_truncate(struct inode *inode)
880880
if (inode->i_size > AFFS_I(inode)->mmu_private) {
881881
struct address_space *mapping = inode->i_mapping;
882882
struct page *page;
883-
void *fsdata;
883+
void *fsdata = NULL;
884884
loff_t isize = inode->i_size;
885885
int res;
886886

0 commit comments

Comments
 (0)