diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index 4f3c08583d8c..a8736c68fa14 100755 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -78,6 +78,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);