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: <20230405023236.10128-1-kuniyu@amazon.com>
Date:   Tue, 4 Apr 2023 19:32:36 -0700
From:   Kuniyuki Iwashima <kuniyu@...zon.com>
To:     "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
CC:     Coco Li <lixiaoyan@...gle.com>,
        Kuniyuki Iwashima <kuniyu@...zon.com>,
        Kuniyuki Iwashima <kuni1840@...il.com>,
        <netdev@...r.kernel.org>
Subject: [PATCH v1 net-next] selftest/net: Fix uninit val warning in tcp_mmap.c.

Commit 5c5945dc695c ("selftests/net: Add SHA256 computation over data
sent in tcp_mmap") forgot to initialise a local var.

  $ make -s -C tools/testing/selftests/net
  tcp_mmap.c: In function ‘child_thread’:
  tcp_mmap.c:211:61: warning: ‘lu’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    211 |                         zc.length = min(chunk_size, FILE_SZ - lu);
        |                                                             ^

Fixes: 5c5945dc695c ("selftests/net: Add SHA256 computation over data sent in tcp_mmap")
Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
---
Note that the cited commit is not merged in net.git.
---
 tools/testing/selftests/net/tcp_mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/tcp_mmap.c b/tools/testing/selftests/net/tcp_mmap.c
index 607cc9ad8d1b..1056e37f4d98 100644
--- a/tools/testing/selftests/net/tcp_mmap.c
+++ b/tools/testing/selftests/net/tcp_mmap.c
@@ -168,7 +168,7 @@ void *child_thread(void *arg)
 	double throughput;
 	struct rusage ru;
 	size_t buffer_sz;
-	int lu, fd;
+	int lu = 0, fd;
 
 	fd = (int)(unsigned long)arg;
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ