提交 9c471370 编写于 作者: M Martin KaFai Lau 提交者: 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: NHuapeng Zhou <hzhou@fb.com>
Tested-by: NFeixiong Zhang <feixiong@fb.com>
Acked-by: NAlexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: NMartin KaFai Lau <kafai@fb.com>
Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ccaba062
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册