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: <20210515180817.1751084-1-trix@redhat.com>
Date:   Sat, 15 May 2021 11:08:17 -0700
From:   trix@...hat.com
To:     dennis@...nel.org, tj@...nel.org, cl@...ux.com,
        akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Tom Rix <trix@...hat.com>
Subject: [PATCH] percpu: initialize best_upa variable

From: Tom Rix <trix@...hat.com>

Static analysis reports this problem
percpu.c:2945:6: warning: Assigned value is garbage or undefined
        upa = best_upa;
            ^ ~~~~~~~~
best_upa may not be set, so initialize it.

Signed-off-by: Tom Rix <trix@...hat.com>
---
 mm/percpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/percpu.c b/mm/percpu.c
index a257c3efdf18b..6578b706fae81 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -2916,6 +2916,7 @@ static struct pcpu_alloc_info * __init __flatten pcpu_build_alloc_info(
 	 * Related to atom_size, which could be much larger than the unit_size.
 	 */
 	last_allocs = INT_MAX;
+	best_upa = max_upa;
 	for (upa = max_upa; upa; upa--) {
 		int allocs = 0, wasted = 0;
 
-- 
2.26.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ