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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu,  3 Mar 2022 23:56:47 +0000
From:   Colin Ian King <colin.i.king@...il.com>
To:     David Howells <dhowells@...hat.com>,
        Jeff Layton <jlayton@...nel.org>
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] netfs: fix uninitilalized value in ret being returned

In the case where sync is not true the variable ret not being
set and a garbage value is being returned. Fix this by ensuring
ret is initialized to 0.

Fixes: c19a5d31b470 ("netfs: Add a function to consolidate beginning a read")
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
 fs/netfs/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/netfs/io.c b/fs/netfs/io.c
index 3db9356eb7c2..05fbe6665508 100644
--- a/fs/netfs/io.c
+++ b/fs/netfs/io.c
@@ -601,7 +601,7 @@ static bool netfs_rreq_submit_slice(struct netfs_io_request *rreq,
 int netfs_begin_read(struct netfs_io_request *rreq, bool sync)
 {
 	unsigned int debug_index = 0;
-	int ret;
+	int ret = 0;
 
 	_enter("R=%x %llx-%llx",
 	       rreq->debug_id, rreq->start, rreq->start + rreq->len - 1);
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ