lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251019083647.2096733-1-kriish.sharma2006@gmail.com>
Date: Sun, 19 Oct 2025 08:36:47 +0000
From: Kriish Sharma <kriish.sharma2006@...il.com>
To: clm@...com,
	dsterba@...e.com
Cc: linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	skhan@...uxfoundation.org,
	david.hunter.linux@...il.com,
	Kriish Sharma <kriish.sharma2006@...il.com>,
	kernel test robot <lkp@...el.com>
Subject: [PATCH] btrfs: initialize folios to NULL in compress_file_range()

The variable 'folios' may be used uninitialized when jumping to cleanup
labels, triggering the following clang warning:

  fs/btrfs/inode.c:874:6: warning: variable 'folios' is used uninitialized
  whenever 'if' condition is true

Initialize 'folios' to NULL to ensure the cleanup path is safe and to
silence the compiler warning.

Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202510171743.VQ6yA0Uu-lkp@intel.com/
Signed-off-by: Kriish Sharma <kriish.sharma2006@...il.com>
---
 fs/btrfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d726bcdacf6b..54903e17338f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -862,7 +862,7 @@ static void compress_file_range(struct btrfs_work *work)
 	u64 actual_end;
 	u64 i_size;
 	int ret = 0;
-	struct folio **folios;
+	struct folio **folios = NULL;
 	unsigned long nr_folios;
 	unsigned long total_compressed = 0;
 	unsigned long total_in = 0;
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ