]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_healer: initialize variable here
authorDarrick J. Wong <djwong@kernel.org>
Tue, 2 Jun 2026 04:58:50 +0000 (21:58 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 3 Jun 2026 08:45:24 +0000 (10:45 +0200)
Initialize the event prefix to zeroes so that we don't read bogus stack
data if the filesystem doesn't support parent pointers.  Found by Codex.

Cc: linux-xfs@vger.kernel.org # v7.0.0
Fixes: 17d840245c0e20 ("xfs_healer: use getparents to look up file names")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
healer/fsrepair.c

index 3f9bd39de9cec6eaac895e6c346a77603ff7549b..7ad513b2d69b9384b7f4871b21572c044b37381f 100644 (file)
@@ -203,7 +203,7 @@ try_repair_inode(
                {0,             0},
        };
 #undef X
-       struct hme_prefix       new_pfx;
+       struct hme_prefix       new_pfx = { };
        const struct hme_prefix *pfx = orig_pfx;
        const struct u32_scrub  *f;