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]
Date:   Thu, 18 Jan 2018 16:30:49 -0800
From:   akpm@...ux-foundation.org
To:     davem@...emloft.net, netdev@...r.kernel.org,
        akpm@...ux-foundation.org, jiri@...lanox.com, nogahf@...lanox.com,
        yuvalm@...lanox.com
Subject: [patch 1/1] net/sched/sch_prio.c: work around gcc-4.4.4 union
 initializer issues

From: Andrew Morton <akpm@...ux-foundation.org>
Subject: net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues

gcc-4.4.4 has problems witn anon union initializers.  Work around this.

net/sched/sch_prio.c: In function 'prio_dump_offload':
net/sched/sch_prio.c:260: error: unknown field 'stats' specified in initializer
net/sched/sch_prio.c:260: warning: initialization makes integer from pointer without a cast
net/sched/sch_prio.c:261: error: unknown field 'stats' specified in initializer
net/sched/sch_prio.c:261: warning: initialization makes integer from pointer without a cast

Fixes: 7fdb61b44c0c95 ("net: sch: prio: Add offload ability to PRIO qdisc")
Cc: Nogah Frankel <nogahf@...lanox.com>
Cc: Yuval Mintz <yuvalm@...lanox.com>
Cc: Jiri Pirko <jiri@...lanox.com>
Cc: David S. Miller <davem@...emloft.net>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 net/sched/sch_prio.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff -puN net/sched/sch_prio.c~net-sched-sch_prioc-work-around-gcc-444-union-initializer-issues net/sched/sch_prio.c
--- a/net/sched/sch_prio.c~net-sched-sch_prioc-work-around-gcc-444-union-initializer-issues
+++ a/net/sched/sch_prio.c
@@ -254,11 +254,15 @@ static int prio_dump_offload(struct Qdis
 {
 	struct net_device *dev = qdisc_dev(sch);
 	struct tc_prio_qopt_offload hw_stats = {
+		.command = TC_PRIO_STATS,
 		.handle = sch->handle,
 		.parent = sch->parent,
-		.command = TC_PRIO_STATS,
-		.stats.bstats = &sch->bstats,
-		.stats.qstats = &sch->qstats,
+		{
+			.stats = {
+				.bstats = &sch->bstats,
+				.qstats = &sch->qstats,
+			},
+		},
 	};
 	int err;
 
_

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ