From: Martin KaFai Lau Date: Thu, 23 Feb 2017 18:40:34 +0000 (-0800) Subject: bpf: Fix bpf_xdp_event_output X-Git-Tag: v4.11-rc1~93^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c4713701c01e4cef6e2315c2818abc919ffb0de;p=platform%2Fkernel%2Flinux-exynos.git 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") Reported-by: Huapeng Zhou Tested-by: Feixiong Zhang Acked-by: Alexei Starovoitov Cc: Daniel Borkmann Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: David S. Miller --- diff --git a/net/core/filter.c b/net/core/filter.c index e466e004..ebaeaf2 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -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 = {