Skip to contentSkip to conversation

bpf: Fix bpf_xdp_event_output

PATCH Applied Martin KaFai Lau 3 participants 3 messages Feb 23, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: Fix bpf_xdp_event_output

Fix a typo. xdp->data instead of xdp should be copied to the perf-event's dst_buff.

Fixes 4de16969523c ("bpf: enable event output helper also for xdp types")
Cc Daniel Borkmann <[email protected]>
---
 net/core/filter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/core/filter.c +2 -2
index e466e0040137..ebaeaf2e46e8 100644
@@ -2584,8 +2584,8 @@ BPF_CALL_5(bpf_xdp_event_output, struct xdp_buff *, xdp, struct bpf_map *, map,
 	if (unlikely(xdp_size > (unsigned long)(xdp->data_end - xdp->data)))
 		return -EFAULT;
 
-	return bpf_event_output(map, flags, meta, meta_size, xdp, xdp_size,
-				bpf_xdp_copy);
+	return bpf_event_output(map, flags, meta, meta_size, xdp->data,
+				xdp_size, bpf_xdp_copy);
 }
 
 static const struct bpf_func_proto bpf_xdp_event_output_proto = {
Signature · 1 line
2.5.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Martin KaFai Lau

Fix a typo. xdp->data instead of xdp should be copied to the perf-event's dst_buff.

Fixes 4de16969523c ("bpf: enable event output helper also for xdp types")
Cc Daniel Borkmann <[email protected]>

Thanks!

maintainer Applied
#2 lore raw
In reply to Martin KaFai Lau

From: Martin KaFai Lau <[email protected]>
Date: Thu, 23 Feb 2017 10:40:34 -0800

Quoted 9 lines

Fix a typo. xdp->data instead of xdp should be copied to the perf-event's dst_buff.

Fixes 4de16969523c ("bpf: enable event output helper also for xdp types")
Cc Daniel Borkmann <[email protected]>

Applied, thanks.