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: <20160704150659.2883024-1-arnd@arndb.de>
Date:	Mon,  4 Jul 2016 17:06:26 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Doug Ledford <dledford@...hat.com>
Cc:	Arnd Bergmann <arnd@...db.de>, Sean Hefty <sean.hefty@...el.com>,
	Hal Rosenstock <hal.rosenstock@...il.com>,
	Haggai Eran <haggaie@...lanox.com>,
	Matan Barak <matanb@...lanox.com>,
	Yotam Kenneth <yotamke@...lanox.com>,
	Moni Shoua <monis@...lanox.com>, linux-rdma@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] infiniband: shut up a maybe-uninitialized warning

The powerpc64 default configuration leads to warnings for the infiniband
core code:

infiniband/core/cma.c: In function 'cma_get_net_dev':
infiniband/core/cma.c:1242:12: warning: 'src_addr_storage.sin_addr.s_addr' may be used uninitialized in this function [-Wmaybe-uninitialized]

The code looks correct to me, and I don't see the warnings on the
other architectures, so this is a dumb change to add an unneeded
initialization to the variables in order to shut up the warning.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Link: http://arm-soc.lixom.net/buildlogs/mainline/v4.7-rc6/buildall.powerpc.ppc64_defconfig.log.passed
---
 drivers/infiniband/core/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index a3c9930f1f93..924ac237310b 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1309,7 +1309,7 @@ static bool validate_net_dev(struct net_device *net_dev,
 static struct net_device *cma_get_net_dev(struct ib_cm_event *ib_event,
 					  const struct cma_req_info *req)
 {
-	struct sockaddr_storage listen_addr_storage, src_addr_storage;
+	struct sockaddr_storage listen_addr_storage = {}, src_addr_storage = {};
 	struct sockaddr *listen_addr = (struct sockaddr *)&listen_addr_storage,
 			*src_addr = (struct sockaddr *)&src_addr_storage;
 	struct net_device *net_dev;
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ