summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_skbprio.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_skbprio.c')
-rw-r--r--net/sched/sch_skbprio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sched/sch_skbprio.c b/net/sched/sch_skbprio.c
index 0fb10abf7579..7a5e4c454715 100644
--- a/net/sched/sch_skbprio.c
+++ b/net/sched/sch_skbprio.c
@@ -169,6 +169,9 @@ static int skbprio_change(struct Qdisc *sch, struct nlattr *opt,
{
struct tc_skbprio_qopt *ctl = nla_data(opt);
+ if (opt->nla_len != nla_attr_size(sizeof(*ctl)))
+ return -EINVAL;
+
sch->limit = ctl->limit;
return 0;
}