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]
Date:   Sun, 20 Feb 2022 20:16:06 +0530
From:   Souptick Joarder <jrdr.linux@...il.com>
To:     clm@...com, josef@...icpanda.com, dsterba@...e.com,
        nathan@...nel.org, ndesaulniers@...gle.com
Cc:     linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev,
        "Souptick Joarder (HPE)" <jrdr.linux@...il.com>,
        kernel test robot <lkp@...el.com>
Subject: [PATCH] btrfs: Initialize ret to 0 in scrub_simple_mirror()

From: "Souptick Joarder (HPE)" <jrdr.linux@...il.com>

Kernel test robot reported below warning ->
fs/btrfs/scrub.c:3439:2: warning: Undefined or garbage value
returned to caller [clang-analyzer-core.uninitialized.UndefReturn]

Initialize ret to 0.

Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Souptick Joarder (HPE) <jrdr.linux@...il.com>
---
 fs/btrfs/scrub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 4baa8e43d585..5ca7e5ffbc96 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3325,7 +3325,7 @@ static int scrub_simple_mirror(struct scrub_ctx *sctx,
 	const u32 max_length = SZ_64K;
 	struct btrfs_path path = {};
 	u64 cur_logical = logical_start;
-	int ret;
+	int ret = 0;
 
 	/* The range must be inside the bg */
 	ASSERT(logical_start >= bg->start &&
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ