Commit 26afa0a4 authored by David Ahern's avatar David Ahern Committed by Alexei Starovoitov

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: fbee97fe ("bpf: Add support to attach bpf program to a devmap entry")
Signed-off-by: default avatarDavid Ahern <dsahern@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200608151723.9539-1-dsahern@kernel.org
parent 22d5bd68
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment