]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
bpf: Fix bpf_xdp_event_output
authorMartin KaFai Lau <kafai@fb.com>
Thu, 23 Feb 2017 18:40:34 +0000 (10:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2017 18:53:42 +0000 (13:53 -0500)
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>
net/core/filter.c

index e466e0040137caba1c95a50df68cb2ef2af6f633..ebaeaf2e46e8bd0171379604930d232f205afd07 100644 (file)
@@ -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 = {