From 2c4316b09609b12abc2bc485ffd752a9bd023d1b Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 28 Jul 2025 13:28:10 -0400 Subject: [PATCH] Avoid uninitialized map, flags in ext. This function returns a stack pointer to a struct scoutfs_extent, after setting start, len to an extent found in the proper zone, but it leaves map and flags members unset. Initialize the struct to {0,} avoids passing uninitialized values up the callstack. Signed-off-by: Auke Kok --- kmod/src/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/alloc.c b/kmod/src/alloc.c index 40c33c20..0ceaf3b8 100644 --- a/kmod/src/alloc.c +++ b/kmod/src/alloc.c @@ -857,7 +857,7 @@ static int find_zone_extent(struct super_block *sb, struct scoutfs_alloc_root *r .zone = SCOUTFS_FREE_EXTENT_ORDER_ZONE, }; struct scoutfs_extent found; - struct scoutfs_extent ext; + struct scoutfs_extent ext = {0,}; u64 start; u64 len; int nr;