aboutsummaryrefslogtreecommitdiff
path: root/net/bpf/test_run.c
diff options
context:
space:
mode:
authorDave Airlie2021-07-26 09:27:59 +1000
committerDave Airlie2021-07-26 09:27:59 +1000
commit35482f9dc56b9bd0f179106da7e461f6c2a2d891 (patch)
treeb04c95e464c3724b5b5b0ba50ad4a26886b2497a /net/bpf/test_run.c
parent8da49a33dda7294c1af508f8aa81cd638d0afd62 (diff)
parentff1176468d368232b684f75e82563369208bc371 (diff)
Backmerge tag 'v5.14-rc3' into drm-next
Linux 5.14-rc3 Daniel said we should pull the nouveau fix from fixes in here, probably a good plan. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'net/bpf/test_run.c')
-rw-r--r--net/bpf/test_run.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index aa47af349ba8..1cc75c811e24 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -701,6 +701,9 @@ int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr,
void *data;
int ret;
+ if (prog->expected_attach_type == BPF_XDP_DEVMAP ||
+ prog->expected_attach_type == BPF_XDP_CPUMAP)
+ return -EINVAL;
if (kattr->test.ctx_in || kattr->test.ctx_out)
return -EINVAL;