diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index 0dfef59cf3dee5f798a9ee0d20e4c2ee2291f1d1..df8d9d800ebcf0ae3da2b84ed47564522e707f4a 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -229,6 +229,7 @@ static void *bpf_test_init(const union bpf_attr *kattr, u32 size, if (user_size > size) return ERR_PTR(-EMSGSIZE); + size = SKB_DATA_ALIGN(size); data = kzalloc(size + headroom + tailroom, GFP_USER); if (!data) return ERR_PTR(-ENOMEM);