Commit a1ced224 authored by Alexander Potapenko's avatar Alexander Potapenko Committed by sanglipeng
Browse files

affs: initialize fsdata in affs_truncate()

stable inclusion
from stable-v5.10.166
commit 39ab0fc4984285851048716e7f85ef8b11cabf11
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I87FRA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=39ab0fc4984285851048716e7f85ef8b11cabf11



--------------------------------

[ Upstream commit eef034ac ]

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: f2b6a16e ("fs: affs convert to new aops")
Suggested-by: default avatarEric Biggers <ebiggers@kernel.org>
Signed-off-by: default avatarAlexander Potapenko <glider@google.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 0bd853e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment