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: <20190617102119.56253-1-vincenzo.frascino@arm.com>
Date:   Mon, 17 Jun 2019 11:21:19 +0100
From:   Vincenzo Frascino <vincenzo.frascino@....com>
To:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
        vincenzo.frascino@....com
Subject: [PATCH] fib_semantics: Fix warning in fib_check_nh_v4_gw

Currently, the err variable in fib_check_nh_v4_gw may be used
uninitialized leading to the warning below:

  fib_semantics.c: In function ‘fib_check_nh_v4_gw’:
  fib_semantics.c:1023:12: warning: ‘err’ may be used
    uninitialised in this function [-Wmaybe-uninitialized]
       if (!tbl || err) {
                   ^~

Initialize err to 0 to fix the warning.

Cc: "David S. Miller" <davem@...emloft.net>
Cc: Alexey Kuznetsov <kuznet@....inr.ac.ru>
Cc: Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
---
 net/ipv4/fib_semantics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index b80410673915..bfa49a88d03a 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -964,7 +964,7 @@ static int fib_check_nh_v4_gw(struct net *net, struct fib_nh *nh, u32 table,
 {
 	struct net_device *dev;
 	struct fib_result res;
-	int err;
+	int err = 0;
 
 	if (nh->fib_nh_flags & RTNH_F_ONLINK) {
 		unsigned int addr_type;
-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ