]> git.baikalelectronics.ru Git - kernel.git/commit
affs: initialize fsdata in affs_truncate()
authorAlexander Potapenko <glider@google.com>
Tue, 10 Jan 2023 12:49:30 +0000 (13:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:36 +0000 (07:52 +0100)
commit087d3ae22c811f163d6f24aaa1ebc72d4da130a3
tree85d857afd980f1d7ba69ae24c9dff5fa2b5a98de
parenta7c884c4055943c5e1b1a01ba8990354f33c1931
affs: initialize fsdata in affs_truncate()

[ Upstream commit eef034ac6690118c88f357b00e2b3239c9d8575d ]

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: 72631fe02974 ("fs: affs convert to new aops")
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/affs/file.c