netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
@ 2016-07-18 22:50 akpm
  2016-07-19  0:33 ` Alexei Starovoitov
  2016-07-20  2:28 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: akpm @ 2016-07-18 22:50 UTC (permalink / raw)
  To: davem, netdev, akpm, ast, daniel

From: Andrew Morton <akpm@linux-foundation.org>
Subject: kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug

kernel/trace/bpf_trace.c: In function 'bpf_event_output':
kernel/trace/bpf_trace.c:312: error: unknown field 'next' specified in initializer
kernel/trace/bpf_trace.c:312: warning: missing braces around initializer
kernel/trace/bpf_trace.c:312: warning: (near initialization for 'raw.frag.<anonymous>')

Fixes: 555c8a8623a3a87 ("bpf: avoid stack copy and use skb ctx for event output")
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/trace/bpf_trace.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN kernel/trace/bpf_trace.c~kernel-trace-bpf_tracec-work-around-gcc-444-anon-union-initialization-bug kernel/trace/bpf_trace.c
--- a/kernel/trace/bpf_trace.c~kernel-trace-bpf_tracec-work-around-gcc-444-anon-union-initialization-bug
+++ a/kernel/trace/bpf_trace.c
@@ -309,7 +309,9 @@ u64 bpf_event_output(struct bpf_map *map
 	};
 	struct perf_raw_record raw = {
 		.frag = {
-			.next	= ctx_size ? &frag : NULL,
+			{
+				.next	= ctx_size ? &frag : NULL,
+			},
 			.size	= meta_size,
 			.data	= meta,
 		},
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-20  2:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-18 22:50 [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug akpm
2016-07-19  0:33 ` Alexei Starovoitov
2016-07-19  0:38   ` Fengguang Wu
2016-07-19  2:38     ` Alexei Starovoitov
2016-07-19  3:07       ` Fengguang Wu
2016-07-19  8:19         ` Daniel Borkmann
2016-07-20  2:28 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).