diff options
Diffstat (limited to 'net/sched/act_bpf.c')
-rw-r--r-- | net/sched/act_bpf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c index 1bd257e473a9..82c5d7fc1988 100644 --- a/net/sched/act_bpf.c +++ b/net/sched/act_bpf.c @@ -122,6 +122,9 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla, return -EINVAL; bpf_size = bpf_num_ops * sizeof(*bpf_ops); + if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS])) + return -EINVAL; + bpf_ops = kzalloc(bpf_size, GFP_KERNEL); if (!bpf_ops) return -ENOMEM; |