summaryrefslogtreecommitdiffstats
path: root/net/bpf/test_run.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--net/bpf/test_run.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index f4078830e..e0c6dfae4 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -87,6 +87,7 @@ static void *bpf_test_init(const union bpf_attr *kattr, u32 size,
if (size < ETH_HLEN || size > PAGE_SIZE - headroom - tailroom)
return ERR_PTR(-EINVAL);
+ size = SKB_DATA_ALIGN(size);
data = kzalloc(size + headroom + tailroom, GFP_USER);
if (!data)
return ERR_PTR(-ENOMEM);