Skip to content

Commit 183fc15

Browse files
akpm00davem330
authored andcommitted
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: 555c8a8 ("bpf: avoid stack copy and use skb ctx for event output") Acked-by: Daniel Borkmann <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a725ee3 commit 183fc15

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/trace/bpf_trace.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ u64 bpf_event_output(struct bpf_map *map, u64 flags, void *meta, u64 meta_size,
309309
};
310310
struct perf_raw_record raw = {
311311
.frag = {
312-
.next = ctx_size ? &frag : NULL,
312+
{
313+
.next = ctx_size ? &frag : NULL,
314+
},
313315
.size = meta_size,
314316
.data = meta,
315317
},

0 commit comments

Comments
 (0)