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: <20230724054538.163319-1-suhui@nfschina.com>
Date:   Mon, 24 Jul 2023 13:45:39 +0800
From:   Su Hui <suhui@...china.com>
To:     tytso@....edu, adilger.kernel@...ger.ca, nathan@...nel.org,
        ndesaulniers@...gle.com, trix@...hat.com
Cc:     linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, kernel-janitors@...r.kernel.org,
        Su Hui <suhui@...china.com>
Subject: [PATCH] ext4: mballoc: avoid garbage value from err

clang warning: fs/ext4/mballoc.c, line 4178, column 6
Branch condition evaluates to a garbage value.

err is uninitialized and will be judged when it enters the
loop first time and the condition "!ext4_sb_block_valid()"
is true. Although this can't make problems now, it's better
to correct it.

Signed-off-by: Su Hui <suhui@...china.com>
---
 fs/ext4/mballoc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 21b903fe546e..769000c970b0 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4084,7 +4084,7 @@ void ext4_mb_mark_bb(struct super_block *sb, ext4_fsblk_t block,
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 	ext4_group_t group;
 	ext4_grpblk_t blkoff;
-	int i, err;
+	int i, err = 0;
 	int already;
 	unsigned int clen, clen_changed, thisgrp_len;
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ