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>] [day] [month] [year] [list]
Message-Id: <20180118080555.1627-1-jiri@resnulli.us>
Date:   Thu, 18 Jan 2018 09:05:55 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, jhs@...atatu.com, xiyou.wangcong@...il.com,
        mlxsw@...lanox.com, sfr@...b.auug.org.au
Subject: [patch net-next] net: sched: silence uninitialized parent variable warning in tc_dump_tfilter

From: Jiri Pirko <jiri@...lanox.com>

When tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK, parent is still passed
down but the value is never used. Compiler does not recognize it and
issues a warning. Silence it down initializing parent to 0.

Reported-by: David Miller <davem@...emloft.net>
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Jiri Pirko <jiri@...lanox.com>
---
 net/sched/cls_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index e500d11da9cd..9683f8550f6f 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -1303,7 +1303,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
 	struct tcmsg *tcm = nlmsg_data(cb->nlh);
 	long index_start;
 	long index;
-	u32 parent;
+	u32 parent = 0;
 	int err;
 
 	if (nlmsg_len(cb->nlh) < sizeof(*tcm))
-- 
2.14.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ