Skip to content

Commit 26afa0a

Browse files
dsahernAlexei Starovoitov
authored andcommitted
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: fbee97f ("bpf: Add support to attach bpf program to a devmap entry") Signed-off-by: David Ahern <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 22d5bd6 commit 26afa0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/bpf/devmap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ static struct xdp_buff *dev_map_run_prog(struct net_device *dev,
479479
struct xdp_txq_info txq = { .dev = dev };
480480
u32 act;
481481

482+
xdp_set_data_meta_invalid(xdp);
482483
xdp->txq = &txq;
483484

484485
act = bpf_prog_run_xdp(xdp_prog, xdp);

0 commit comments

Comments
 (0)