Commit 9c471370 authored by Martin KaFai Lau's avatar Martin KaFai Lau Committed by David S. Miller

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: 4de16969 ("bpf: enable event output helper also for xdp types")
Reported-by: default avatarHuapeng Zhou <hzhou@fb.com>
Tested-by: default avatarFeixiong Zhang <feixiong@fb.com>
Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ccaba062
...@@ -2584,8 +2584,8 @@ BPF_CALL_5(bpf_xdp_event_output, struct xdp_buff *, xdp, struct bpf_map *, map, ...@@ -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))) if (unlikely(xdp_size > (unsigned long)(xdp->data_end - xdp->data)))
return -EFAULT; return -EFAULT;
return bpf_event_output(map, flags, meta, meta_size, xdp, xdp_size, return bpf_event_output(map, flags, meta, meta_size, xdp->data,
bpf_xdp_copy); xdp_size, bpf_xdp_copy);
} }
static const struct bpf_func_proto bpf_xdp_event_output_proto = { static const struct bpf_func_proto bpf_xdp_event_output_proto = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment