diff options
author | Martin KaFai Lau <kafai@fb.com> | 2017-02-23 13:40:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-23 13:53:42 -0500 |
commit | 9c4713701c01e4cef6e2315c2818abc919ffb0de (patch) | |
tree | 39f6f0e7dbdf11ef676d4dd48cfaea23d0856382 /net | |
parent | ccaba0621a8577ce6b84cf625f2b9a4c6466d999 (diff) |
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 <hzhou@fb.com>
Tested-by: Feixiong Zhang <feixiong@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index e466e0040137..ebaeaf2e46e8 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, | |||
2584 | if (unlikely(xdp_size > (unsigned long)(xdp->data_end - xdp->data))) | 2584 | if (unlikely(xdp_size > (unsigned long)(xdp->data_end - xdp->data))) |
2585 | return -EFAULT; | 2585 | return -EFAULT; |
2586 | 2586 | ||
2587 | return bpf_event_output(map, flags, meta, meta_size, xdp, xdp_size, | 2587 | return bpf_event_output(map, flags, meta, meta_size, xdp->data, |
2588 | bpf_xdp_copy); | 2588 | xdp_size, bpf_xdp_copy); |
2589 | } | 2589 | } |
2590 | 2590 | ||
2591 | static const struct bpf_func_proto bpf_xdp_event_output_proto = { | 2591 | static const struct bpf_func_proto bpf_xdp_event_output_proto = { |