@@ -1638,6 +1638,7 @@ int nfs_options2pmap(struct mount_options *options,
struct pmap *nfs_pmap, struct pmap *mnt_pmap)
{
struct nfs_version version;
+ memset(&version, 0, sizeof(version));
if (!nfs_nfs_program(options, &nfs_pmap->pm_prog))
return 0;
@@ -517,6 +517,10 @@ nfs_rewrite_pmap_mount_options(struct mount_options *options, int checkv4)
unsigned long protocol;
struct pmap mnt_pmap;
+ /* initialize structs */
+ memset(&nfs_pmap, 0, sizeof(struct pmap));
+ memset(&mnt_pmap, 0, sizeof(struct pmap));
+
/*
* Version and transport negotiation is not required
* and does not work for RDMA mounts.
recent changes of utils/mount cause a regression mount fail: https://bugzilla.redhat.com/show_bug.cgi?id=1415024 can not reproduce it on x86_64(gcc on x86_64 might do struct initialize by default, I'm not sure). but it can be reproduced always on platform ppc64le aarch64. Signed-off-by: Jianhong Yin <yin-jianhong@163.com> --- utils/mount/network.c | 1 + utils/mount/stropts.c | 4 ++++ 2 files changed, 5 insertions(+)