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:   Fri, 23 Apr 2021 13:42:01 +0100
From:   Khaled ROMDHANI <khaledromdhani216@...il.com>
To:     clm@...com, josef@...icpanda.com, dsterba@...e.com
Cc:     Khaled ROMDHANI <khaledromdhani216@...il.com>,
        linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: [PATCH-next] fs/btrfs: Fix uninitialized variable

The variable 'zone' is uninitialized which
introduce some build warning.

It is not always set or overwritten within
the function. So explicitly initialize it.

Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Khaled ROMDHANI <khaledromdhani216@...il.com>
---
 fs/btrfs/zoned.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 432509f4b3ac..42f99b25127f 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -136,7 +136,7 @@ static int sb_write_pointer(struct block_device *bdev, struct blk_zone *zones,
  */
 static inline u32 sb_zone_number(int shift, int mirror)
 {
-	u64 zone;
+	u64 zone = 0;
 
 	ASSERT(mirror < BTRFS_SUPER_MIRROR_MAX);
 	switch (mirror) {

base-commit: c05b2a58c9ed11bd753f1e64695bd89da715fbaa
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ