summaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@kernel.org>2020-06-08 17:17:23 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-06-09 20:19:35 +0200
commit26afa0a4eb3fd87757f9de56ec5db5a03b14e120 (patch)
tree4fb2335426fa09726592ff143124f2f4ade9cac6 /kernel/bpf
parenttracing/probe: Fix bpf_task_fd_query() for kprobes and uprobes (diff)
downloadlinux-26afa0a4eb3fd87757f9de56ec5db5a03b14e120.tar.xz
linux-26afa0a4eb3fd87757f9de56ec5db5a03b14e120.zip
bpf: Reset data_meta before running programs attached to devmap entry
This is a new context that does not handle metadata at the moment, so mark data_meta invalid. Fixes: fbee97feed9b ("bpf: Add support to attach bpf program to a devmap entry") Signed-off-by: David Ahern <dsahern@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200608151723.9539-1-dsahern@kernel.org
Diffstat (limited to 'kernel/bpf')
-rw-r--r--kernel/bpf/devmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index 854b09beb16b..bfdff2faf5cb 100644
--- a/kernel/bpf/devmap.c
+++ b/kernel/bpf/devmap.c
@@ -479,6 +479,7 @@ static struct xdp_buff *dev_map_run_prog(struct net_device *dev,
struct xdp_txq_info txq = { .dev = dev };
u32 act;
+ xdp_set_data_meta_invalid(xdp);
xdp->txq = &txq;
act = bpf_prog_run_xdp(xdp_prog, xdp);